When you use Eloquent, your models have multiple responsibilities. It holds the data from your database, which is what models usually do, but it also has filtering logic, maybe sorting and even more in it. You don’t want that.

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Community Partners