how to check get collection is not empty in laravel code example
Example: laravel check collection not empty
if ($mentor->first()) { }
if (!$mentor->isEmpty()) { }
if ($mentor->count()) { }
if (count($mentor)) { }
if ($mentor->isNotEmpty()) { }
if ($mentor->first()) { }
if (!$mentor->isEmpty()) { }
if ($mentor->count()) { }
if (count($mentor)) { }
if ($mentor->isNotEmpty()) { }