laravel check if get is empty

58

laravel check if get is empty -

if ($mentor->first()) { } 
if (!$mentor->isEmpty()) { }
if ($mentor->count()) { }
if (count($mentor)) { }
if ($mentor->isNotEmpty()) { }

Comments

Submit
0 Comments