Have a look at the God Object episodes here https://laracasts.com/series/whip-monstrous-code-into-shape/episodes/4 and https://laracasts.com/series/whip-monstrous-code-into-shape/episodes/5
Oct 11, 2018
2
Level 1
How to keep your Models small?
Hi all,
Yesterday I saw a great video by Adam Wathan about how to keep your Controllers small (https://www.youtube.com/watch?v=MF0jFKvS4SI). It made a lot of sense and it will be really helpful for future projects.
However, I could not find good explanations on how to keep your Models small. I have a project where both the User.php and another important model have hundreds of lines of code: relations, setters, getters, lots of scopes, ..... When opening the file you can only see the long list of 'use ....' statements that fill the screen.
Any tips on this?
Thanks!
Level 104
2 likes
Please or to participate in this conversation.