Module Addition
Adding a new module is easy:
Backend
DB migartion & seeding
Create table schema. If used, add tags and onps tables. This is done in the migrations folder @database/migration folder. Add seeders if required.
Model
Add module name to App\Providers\AppServiceProvider.enforceMorphMap.
Add Module Model file to app\Models\DigModule\Specific. If used, add related tables models (lookups, tags, onps).
Implement the model's functions per interface definitions.
Configuration files
Add Module name to App\Services\App\Interfaces\modules\ConfigInterface.modules
Create new Configuration files [Module]Config, [Module]Groups, [Module]InitDetails, [Module]Related and implement all required functions.
Frontend
Types
Create a new file @app/resources/js/types/modules define fields Import newly created module type @app/resources/js/types/moduleTypes and add it to TAllModules
Module configs
Add module to @app/resources/js/scripts/stores/module/moduleToUrlModuleName. Add module configurations to @app/resources/js/scripts/stores/moduleDefinitions.ts. These includes:
- name & slug regular expressions
- functions to convert from name to slug and vie-versa
Forms
Create a new Module folder @app/resources/js/components/modules Create and implement [Module]Form, [Module]IdSelector & [Module]New form components