Design Pattern : Service Layer with Laravel 5
François Louchart
18911

Great post, I’ve found this approach very beneficial when it comes to code refactoring and much more maintainable.

I tend to keep both my controller classes and model classes slim, in exchange shove my logic into request classes and service classes.

Request classes does all the validation and input transformation-> controller does the task delegation -> service contains most of the logic then calls model to save the state. I can’t help but to think it makes my code more “functional programming-ish” too.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.