Select Columns through Laravel Eloquent
Now we can select the columns to run the when using the Model::all() method. No Need to use additional select() method
//Instead of this $users = User::select(['id','name','email'])->get(); //Use this one $users = User::all(['id','name','email']);
Top comments (0)