Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel check collection not empty

if ($mentor->first()) { } 
if (!$mentor->isEmpty()) { }
if ($mentor->count()) { }
if (count($mentor)) { }
if ($mentor->isNotEmpty()) { }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #laravel #check #collection #empty
ADD COMMENT
Topic
Name
5+4 =