Select all columns with an asterisk when joining tables with Eloquent or Query Builder.

How can I select all columns from one of multiple concatenated tables?

DB::table('table as t')->select('t*'); 

      

asterix doesn't seem to work in Laravel? Thank!

+3


source to share


2 answers


Yes it works, but you are wrong. Try this (note .

):



DB::table('table as t')->select('t.*');

      

+7


source


Try DB::table('table')->get();



0


source







All Articles