Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Method IlluminateDatabaseEloquentCollection

$users = AppModelsUser::all();

$names = $users->reject(function ($user) {
    return $user->active === false;
})
->map(function ($user) {
    return $user->name;
});
Source by laravel.com #
 
PREVIOUS NEXT
Tagged: #Method #IlluminateDatabaseEloquentCollection
ADD COMMENT
Topic
Name
7+4 =