first where laravel code example
Example 1: firstwhere laravel
Role::firstWhere('name', 'admin')
Role::firstWhere(['name' => 'admin', 'display_name' => 'Administrateur'])
Example 2: eloquent first
$user = User::where('mobile', Input::get('mobile'))->get();
if (!$user->isEmpty()){
$firstUser = $user->first()
}