Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

how to check if eloquent result is empty

Note:- Credit for this result goes to Alberto Peripolli. Copied from his Grepper.
if ($result->first()) { } 
if (!$result->isEmpty()) { }
if ($result->count()) { }
if (count($result)) { }
Source by www.codegrepper.com #
 
PREVIOUS NEXT
Tagged: #check #eloquent #result #empty
ADD COMMENT
Topic
Name
7+4 =