Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel 8 check if record exists

        
		$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
        }

Source by laravel.com #
 
PREVIOUS NEXT
Tagged: #laravel #check #record #exists
ADD COMMENT
Topic
Name
5+1 =