Installation
Begin by installing this package through Composer. Edit your project's composer.json
file to require vsch/generators
.
"require": {
"vsch/generators": "~2"
},
"minimum-stability" : "stable"
Next, update Composer from the Terminal:
composer update
Once this operation completes, the final step is to add the service provider. Open config/app.php
, and add a new item to the providers array.
Vsch\Generators\GeneratorsServiceProvider::class
That's it! You're all set to go. Run the artisan
command from the Terminal to see the new generate
commands.
php artisan
If you want a copy of the templates in your project's directory so that you can modify them, run the following command from the Terminal in your project directory:
php artisan vendor:publish
This will copy the /config/generate.php and /config/templates/ subdirectory to your project's config/:
config/
templates/
generators.php
You only need to keep the template files that you want to modify. Any files not found in your app's config/template directory will fallback to using the package versions.