Rules & Recommendations
Concord intends to keep the number of their constraints as low as possible, so that you can keep working your way.
- Both the application and modules must be PSR-4 compliant.
- Applications must load the concord service provider.
- Modules must contain a
<ModuleNameSpace>\Providers\ModuleServiceProviderclass that extends
Modules must contain a
resources/mainfest.phpfile that returns at least these:
return [ 'name' => 'The module name', 'version' => 'version string' ];
- Modules should define configuration files
- Module services should be defined via interfaces instead of string based
cool_module.order_number_generator. (The latter is prevalent in the Symfony world, but it has no direct binding on the code level. Laravel's container supports both of these, Concord recommends the interface variant wherever it's possible and reasonable.)
- Modules should use Eloquent models
External Modules Have To Be Aware Of
- Apps may or may not use their parts;
- Eloquent models are subject to customization in the host app;
- Event and Listener classes are visible to apps, but their bindings defined by the module might be ignored by the host app.
Next: Application »