Support the ongoing development of Laravel.io →
posted 8 years ago
Architecture
Last updated 2 years ago.
0

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)

0

Sign in to participate in this thread!

Eventy

Your banner here too?

rudwolf rudwolf Joined 16 May 2016

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.