Laravel Eloquent如何查询多个“ froms”?

时间:2018-11-22 17:29:49

标签: laravel eloquent

如何将这样的查询转换为口才:

select table1.column, table2.column, table3.column from table1, table2, table3

2 个答案:

答案 0 :(得分:0)

您可以使用

DB::query()
  ->from('table1, table2, table3')
  ->select('table1.column', 'table2.column', 'table3.column')
  ->get() 

答案 1 :(得分:0)

您可以使用fromRaw()

DB::query()
    ->select('table1.column', 'table2.column', 'table3.column')
    ->fromRaw('table1, table2, table3')
    ->get();