$user = User::where('email', '=', Input::get('email'))->first();
if ($user === null) {
// user doesn't exist
}
$user = User::where('email', '=', Input::get('email'))->first();
if ($user === null) {
// user doesn't exist
}
or
if (User::where('email', '=', Input::get('email'))->exists()) {
// user found
}
if (DB::table('orders')->where('finalized', 1)->exists()) {
// ...
}
if (DB::table('orders')->where('finalized', 1)->doesntExist()) {
// ...
}
$subscription_count = DB::table('subscriptions')->where('pid_user',$pid_user)->count();
//check if any subscription plan exists
if($subscription_count == 0)
{
//record does not exist
}else{
//record exists
}
//User:: User is going to be what model you use.
//$user can be what ever you need it to be
$user = User::where('email', '=', Input::get('email'))->first();
if ($user != null) {
// Record does exist
}
$user = User::where('email', '=', Input::get('email'))->first();
if ($user === null) {
// user doesn't exist
}
or
if (User::where('email', '=', Input::get('email'))->exists()) {
// user found
}