How to select specific columns in laravel eloquent
Table::where('id', 1)->get(['name','surname']);
You can do it like this:
Table::select('name','surname')->where('id', 1)->get();
Table::where('id', 1)->get(['name','surname']);
You can do it like this:
Table::select('name','surname')->where('id', 1)->get();