first in collection laravel code example
Example 1: firstwhere laravel
Role::firstWhere('name', 'admin')
Role::firstWhere(['name' => 'admin', 'display_name' => 'Administrateur'])
Example 2: add to collection laravel
$item = collect();
$item->push($product);