laravel check record exists
snippet in php

laravel check record exists

user5013

$user = User::where('email', '=', Input::get('email'))->first();
if ($user === null) {
   // user doesn't exist
}

if notexists in laravel query

user4829

if (User::where('email', '=', Input::get('email'))->exists()) {
   // user found
}