Answers for "check if a collection is empty or not laravel"

PHP
2

laravel check collection not empty

if ($mentor->first()) { } 
if (!$mentor->isEmpty()) { }
if ($mentor->count()) { }
if (count($mentor)) { }
if ($mentor->isNotEmpty()) { }
Posted by: Guest on December-21-2020

Code answers related to "check if a collection is empty or not laravel"

Browse Popular Code Answers by Language