laravel eloquent get first

36

$user = User::where('mobile', Input::get('mobile'))->get();

if (!$user->isEmpty()){
    $firstUser = $user->first()
}

Comments

Submit
0 Comments