From 8d064704965a787adc6f619b0013917e49422878 Mon Sep 17 00:00:00 2001 From: Norris Oduro Date: Wed, 4 Oct 2017 22:03:28 +0000 Subject: [PATCH] Support Laravel 5.5+ auto package discovery --- README.md | 7 +++++-- composer.json | 12 +++++++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 70ee7a2..23be4b0 100644 --- a/README.md +++ b/README.md @@ -16,10 +16,13 @@ Begin by installing this package through Composer. Run this command from the Ter ```bash composer require aloha/twilio ``` +If you're using Laravel 5.5+, this is all there is to do. -## Laravel integration +Should you still be on older versions of Laravel, the final steps for you are to add the service provider of the package and alias the package. To do this open your `config/app.php` file. -To wire this up in your Laravel project, whether it's built in Laravel 4 or 5, you need to add the service provider. +## Integration for older versions of Laravel (5.5 -) + +To wire this up in your Laravel project, you need to add the service provider. Open `app.php`, and add a new item to the providers array. ```php diff --git a/composer.json b/composer.json index 5b105a3..fb7306b 100644 --- a/composer.json +++ b/composer.json @@ -39,5 +39,15 @@ "test": "phpunit", "cs": "php-cs-fixer fix src/ --level=psr2" }, - "minimum-stability": "stable" + "minimum-stability": "stable", + "extra": { + "laravel": { + "providers": [ + "Aloha\\Twilio\\Support\\Laravel\\ServiceProvider" + ], + "aliases": { + "Twilio": "Aloha\\Twilio\\Support\\Laravel\\Facade" + } + } + } }