laravel collection empty but query has data code example Example: collection empty laravel $isempty = $collection->isEmpty();