From af52cbb1f58b98659714cbfeed3ad39c17906c61 Mon Sep 17 00:00:00 2001 From: Josh Young Date: Sun, 25 Jul 2021 14:41:08 +0930 Subject: [PATCH] Addition of code to allow for Laravel Package auto discovery --- composer.json | 12 +++++++++++- readme.md | 3 ++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 002e479..f6ba39e 100644 --- a/composer.json +++ b/composer.json @@ -13,5 +13,15 @@ "Dnsimmons\\OpenWeather\\": "src/" } }, - "require": {} + "require": {}, + "extra": { + "laravel": { + "providers": [ + "Dnsimmons\\OpenWeather\\OpenWeatherServiceProvider" + ], + "aliases": { + "OpenWeather": "Dnsimmons\\OpenWeather\\OpenWeather" + } + } + } } diff --git a/readme.md b/readme.md index 842e560..f3548d7 100644 --- a/readme.md +++ b/readme.md @@ -41,7 +41,8 @@ Use [composer](http://getcomposer.org) to install the package $ composer require dnsimmons/openweather -Add the service provider to your `config/app.php` along with an alias: +For Laravel >=5.5 the package is auto-discovered. +For Laravel <5.5 add the service provider to your `config/app.php` along with an alias: 'providers' => [ ...