backstage-technical-services / hub

The starting place for anything related to the website.
0 stars 1 forks source link

Refactor to use modules #128

Open bnjns opened 3 years ago

bnjns commented 3 years ago

With the default Laravel configuration, application code ends up organised by function and not domain. This ends up making it hard to see everything related to, for example, events.

Laravel Modules is a package for Laravel that lets you organise your code into "modules", which in turn have their own folders for controllers, requests, models, etc. This effectively allows you to organise by domain and then function, rather than function and then domain, which in turn makes it easier to find all code related to the domain you're working on. This grouping is also more intuitive.

We should refactor the codebase into this modular structure to make it easier to maintain.

This should wait until the upgrade to Laravel 8.x (#127) is complete.