you can check out Repository Pattern http://vegibit.com/laravel-repository-pattern/ you can start with moving all your CRUD operations out of your controller and move them into Repository Classes. Generally, you should not be using eloquent models directly within your controllers, but is instead using those repositories. Then regards repositories, you can use IoC container to inject them via dependency injection, so you can swap any repository implementation with ease (at least in theory). once you've done that, you can go further and identify long-running operations (stuffs that takes long to execute) and move them into Job Queues (https://laravel.com/docs/5.1/queues)
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community