Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel check if record exists

if (DB::table('orders')->where('finalized', 1)->exists()) {
    // ...
}
 
if (DB::table('orders')->where('finalized', 1)->doesntExist()) {
    // ...
}
Source by laravel.com #
 
PREVIOUS NEXT
Tagged: #laravel #check #record #exists
ADD COMMENT
Topic
Name
5+4 =