How can I run following query in Laravel?
Select column1,column2,column3 from table;
I don't want to retrieve all columns records as we do by
Select * from table;
Use this :
DB::table('table')
->select(array('column1', 'column2', 'column3'))
->get();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With