📌  相关文章
📜  方法 Illuminate\Database\Eloquent\Collection - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:43.799000             🧑  作者: Mango

代码示例7
$users = App\Models\User::all();

$names = $users->reject(function ($user) {
    return $user->active === false;
})
->map(function ($user) {
    return $user->name;
});