Laravel: How to move FAT logic to the Model layer

Luís Nóbrega
6 min readApr 26, 2020

Why we should avoid FAT Controllers, and how to structure the Model layer in Laravel.

Photo by Luca Bravo on Unsplash

Laravel is one of the MVC frameworks from the PHP ecosystem.

And, as such, when we use it, the M and C, models and controllers, have a lot of code.

This makes sense because we need these layers to do the vastest and different operations.

--

--

Luís Nóbrega

Web Developer at 25friday. Likes to travel, write and being a father.