diff --git a/.gitignore b/.gitignore index 06f6ddd..6ab3f5a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,7 @@ -/vendor -composer.phar -composer.lock -.DS_Store -.idea/ +/vendor +composer.phar +composer.lock +.DS_Store +.idea/ +nbproject/ +/nbproject/private/ diff --git a/README.md b/README.md index a7b9386..56bb70f 100644 --- a/README.md +++ b/README.md @@ -17,17 +17,6 @@ Or add the following to your composer.json's require section and `composer updat } ``` -Then register the service provider in your `app/Providers/AppServiceProvider.php` to only be included for the local environment: - -```php -public function register() -{ - if ($this->app->environment() == 'local') { - $this->app->register(\MaddHatter\ViewGenerator\ServiceProvider::class); - } -} -``` - Or if you always want it included regardless of environment, just add it to the `providers` array in `config/app.php` ## Usage diff --git a/composer.json b/composer.json index ae569bc..2930969 100644 --- a/composer.json +++ b/composer.json @@ -19,5 +19,12 @@ "psr-4": { "MaddHatter\\ViewGenerator\\": "src/" } + }, + "extra": { + "laravel": { + "providers": [ + "MaddHatter\\ViewGenerator\\ServiceProvider" + ] + } } }