Eloquent method find() may accept multiple parameters, and then it returns a Collection of all records found with specificied columns, not all columns of model:-
$user = User::find(1, ['first_name', 'email']`;
$users = User::find([1,2,3], ['first_name', 'email']);
I hope someone can benefit from it.
Top comments (0)