Don’t do this mistake in the Laravel collection
Avoid using the empty function in the Laravel collection
Published in
4 min readNov 13, 2022
The Laravel collection is a wrapper of a PHP array. In Laravel world, it was a new data type created based on the array. The Illuminate\Support\Collection
class provides the Laravel collection. Also, the Laravel Eloquent methods will return the collection instance.