Package Data | |
---|---|
Maintainer Username: | chipaau |
Maintainer Contact: | shifau@aasandha.mv (Ahmed Shifau) |
Package Create Date: | 2016-10-23 |
Package Last Update: | 2017-05-24 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-24 15:05:54 |
Package Statistics | |
---|---|
Total Downloads: | 148 |
Monthly Downloads: | 2 |
Daily Downloads: | 0 |
Total Stars: | 1 |
Total Watchers: | 3 |
Total Forks: | 0 |
Total Open Issues: | 0 |
This package includes a bunch of generators out of the box:
support:resource
support:resource:controller
support:resource:model
support:resource:repository
support:resource:request
support:resource:route
support:resource:schema
support:resource:validator
More features are on their way
composer require chipaau/support --dev
You'll only want to use these generators for local development, so you don't want to update the production providers
array in config/app.php
. Instead, add the provider in app/Providers/AppServiceProvider.php
, like so:
public function register()
{
if ($this->app->environment() == 'local') {
$this->app->register(\Support\SupportServiceProvider::class);
}
}
You're all set. Run php artisan
from the console, and you'll see the new commands in the support:*
namespace section.
php artisan support:resource ResourceOne ResourceTwo ResourceThree ...
Notice the format that we use, when giving the command more than 1 resource to create, we separate them with spaces
This would create the whole bundle required for the support module to work. This bundle includes:
Resource controller
Resource model
Resource repository
Resource request
Adding the Resource route to the routes file
Resource schema
Resource validator
php artisan support:resource:controller ResourceOne ResourceTwo ResourceThree ...
This would create the controllers for the required resources. This could be used with all the other available artisan commands.
php artisan vendor:publish --tag="support"
This would copy the configuration file required for modular file generation to the config
directory.
php artisan support:resource ResourceOne ResourceTwo ResourceThree ... --module="ModuleName"
This would create the whole bundle required for the support module, inside the modules folder included in the config/support.php
configuration file. This could be used with all the other available artisan commands.