larasar / module-commands
A set of laravel commands for operating on modules with the Larasar framework
Installs: 20
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Forks: 0
pkg:composer/larasar/module-commands
Requires
- php: >=7.0
README
A set of laravel commands for operating on modules with the Larasar framework
Introduction
This package adds laravel commands to manipulate modules within the Larasar framework.
Commands
All commands are module based. This means that a module must be selected for them to work.
Use the
-hor--helpflag to get more details about any of them.
php artisan module:create: Creates a new module within the framework.php artisan module:select: Select the module to work with.php artisan module:current: See the currently selected module.php artisan module:status: Checks the status of a module.php artisan module:publish: Publishes a module to the module directory.
Other commands work exactly like their php artisan make:* counterparts:
php artisan module:castphp artisan module:channelphp artisan module:commandphp artisan module:controllerphp artisan module:eventphp artisan module:exceptionphp artisan module:factoryphp artisan module:jobphp artisan module:listenerphp artisan module:middlewarephp artisan module:migrationphp artisan module:migratephp artisan module:modelphp artisan module:notificationphp artisan module:observerphp artisan module:policyphp artisan module:providerphp artisan module:requestphp artisan module:resourcephp artisan module:rulephp artisan module:seederphp artisan module:seedphp artisan module:test
Helper functions
module_disk()- The same asStorage::disk('module'). Provides a filesystem disk to the module directory.larasar_module_path(?string $path = null)- The same asStorage:disk('module')->path($path). Returns the full system module path to the given path.larasar_get_enabled_modules()- Returns an array of enabled modules.larasar_each_enabled_module(callable $callable)- Executes the given callable function on each of the enabled modules.larasar_each_enabled_backend_module(callable $callable)- Executes the given callable function on each of the enabled modules that has a backend.larasar_each_enabled_frontend_module(callable $callable)- Executes the given callable function on each of the enabled modules that has a frontend.larasar_enable_module_routes()- Enables the routes provided in each enabled module'sapiRoutes.php.