laravel 8 check if collection empty code example Example: collection empty laravel $isempty = $collection->isEmpty();