Skip to main content
Video

Laravel Code from Controller into Service: The Right Way

February 13, 2020

Enjoyed This Tutorial?

Get access to all premium tutorials, video and text courses, and exclusive Laravel resources. Join our community of 10,000+ developers.

Recent Courses

Comments & Discussion

A
avrahamm ✓ Link copied!

This way all the long logic complexity is just moved one way down to the ReportService class. The long logic complexity was not splitted or simplified, just moved down. Is it worth it? Wouldn't it be better to try really split and simplify the logic and leave the simplified version in Controller method?

PK
Povilas Korop ✓ Link copied!

Good point, so I guess moving to service Service is the next step, and then that Service itself could be split into various sub-methods, later.

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.