Filtering Laravel Collections can become a performance bottleneck. Using the filter method is significantly faster then the where method, if used properly. Read the article for a full comparison and benchmark results.

laravel spatie permission