diff --git a/README.md b/README.md index 9196fe5..d08242d 100644 --- a/README.md +++ b/README.md @@ -30,12 +30,14 @@ For Laravel 5.3 You'll then need to run `composer install` or `composer update` to download it and have the autoloader updated. -Once Laravel-API-Exceptions is installed, you need to register the service provider. Open up `config/app.php` and add the following to the providers key. +Once Laravel-API-Exceptions is installed, if you're using Laravel 5.1, 5.2, 5.3, and 5.4, you need to register the service provider. Open up `config/app.php` and add the following to the providers key. ```php Lanin\Laravel\ApiExceptions\ApiExceptionsServiceProvider::class, ``` +If you're using Laravel 5.5, you don't need to add anything in `config/app.php`. It will use package auto discovery feature in Laravel 5.5. + ### Exceptions Every ApiException can be thrown as a normal exception and they will be automatically serialized to JSON with corresponding HTTP status, if user wants json: diff --git a/composer.json b/composer.json index 4ef4769..d979186 100644 --- a/composer.json +++ b/composer.json @@ -29,6 +29,13 @@ "Lanin\\Laravel\\ApiExceptions\\Tests\\": "tests/" } }, + "extra":{ + "laravel":{ + "providers":[ + "Lanin\\Laravel\\ApiExceptions\\ApiExceptionsServiceProvider" + ] + } + }, "minimum-stability": "dev", "prefer-stable": true } \ No newline at end of file