📜  laravel collection take - PHP 代码示例

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

代码示例4
$collection = collect(['taylor', 'abigail', null])->map(function($name)
{
    return strtoupper($name);
})
->reject(function($name)
{
    return empty($name);
});