Available Commands
Core
The command make:module is the core of Mora to create modular Laravel. Just give the module name after that.
sh
php artisan make:module ModuleNameThe default rule is it will create a module inside Modules directory with Uppercase format.
- If user put module name like "guitar" then the module name will be "Guitar".
- If user put module name like "guitar-hero" then the module name will be "GuitarHero".
- If user put module name like "Guitar" then the module name will be "Guitar".
- if user put module name like "Guitar-Hero" then the module name will be "GuitarHero".
Laravel
Mora utilise the Laravel's artisan command to create file like controller, model, and views with --module flag. Thanks to InterNACHI/modular for this idea. Here are the list of Laravel's artisan command that support in Mora:
make:castmake:channelmake:class,make:commandmake:componentmake:controllermake:enummake:eventmake:exceptionmake:factorymake:interfacemake:jobmake:listenermake:mailmake:middlewaremake:migrationmake:modelmake:notificationmake:observermake:policymake:providermake:resourcemake:rulemake:scopemake:seedermake:testmake:traitmake:view
Livewire and Volt
Mora also support the command to generate Livewire and Volt components by using --module flag. You just need to run make:livewire, livewire:make, or make:volt with --module flag.
Mora
This package has several commands to support the modular Laravel.
mora:composer-requirefor require composer package in a modulemora:npm-installfor install npm packages in a modulemora:test-namespacefor add module test namespace to root composer.json autoload-devmora:test-setupfor setup module tests in phpunit.xml and Pest.php (root Laravel project)mora:vitefor configure Vite and set"workspaces"in package.json for modular Laravel architecture