diff --git a/composer.json b/composer.json index 45e9ecd..4e88065 100644 --- a/composer.json +++ b/composer.json @@ -20,5 +20,12 @@ "psr-4": { "Laracasts\\Generators\\": "src/" } + }, + "extra": { + "laravel": { + "providers": [ + "Laracasts\\Generators\\GeneratorsServiceProvider" + ] + } } } diff --git a/readme.md b/readme.md index 2d4907e..74ed123 100644 --- a/readme.md +++ b/readme.md @@ -12,7 +12,21 @@ L5 includes a bunch of generators out of the box, so this package only needs to *With one or two more to come.* -## Usage + +## Usage on Laravel 5.5 + +### Step 1: Install Through Composer + +``` +composer require laracasts/generators --dev +``` + +### Step 2: Run Artisan! + +You're all set. Run `php artisan` from the console, and you'll see the new commands in the `make:*` namespace section. + + +## Usage on Laravel 5.4 and 5.3 ### Step 1: Install Through Composer diff --git a/src/Commands/MigrationMakeCommand.php b/src/Commands/MigrationMakeCommand.php index c083259..800d1e5 100644 --- a/src/Commands/MigrationMakeCommand.php +++ b/src/Commands/MigrationMakeCommand.php @@ -60,6 +60,17 @@ public function __construct(Filesystem $files) $this->composer = app()['composer']; } + /** + * Alias for the fire method. + * + * In Laravel 5.5 the fire() method has been renamed to handle(). + * This alias provides support for both Laravel 5.4 and 5.5. + */ + public function handle() + { + $this->fire(); + } + /** * Execute the console command. *