Appearance
Back-end: Current challenges
Our codebase has a lot of stale parts. We aware about them, just need some time to fix all these problems step by step. Consider improving such code whenever you touch it. Just one small step at the time.
Eloquent queries in Models
Consider using scopes or tappable scopes when it’s possible and meaningful.
Bad separation of concerns on some systems/modules
Ways to solve:
- Rely on interfaces, not implementations.
- Do communication between systems/modules using Events/Observers/Subscribers.
Fat controllers
Ways to solve:
- Consider moving domain logic to domain layer: Models, Actions.
- Consider moving view logic to Blade components.
- Consider using Form Requests.
God objects
Ways to solve:
- Use traits (e.g., move all course-related functionality from the Member model to
CanUseCoursestrait). - Use strategy pattern and/or Actions.
Slow console commands
Move heavy logic to Queued Jobs.