Skip to content

Commit

Permalink
Addition of code to allow for Laravel Package auto discovery
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Young committed Jul 25, 2021
1 parent 19b4959 commit af52cbb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
12 changes: 11 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,15 @@
"Dnsimmons\\OpenWeather\\": "src/"
}
},
"require": {}
"require": {},
"extra": {
"laravel": {
"providers": [
"Dnsimmons\\OpenWeather\\OpenWeatherServiceProvider"
],
"aliases": {
"OpenWeather": "Dnsimmons\\OpenWeather\\OpenWeather"
}
}
}
}
3 changes: 2 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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' => [
...
Expand Down

0 comments on commit af52cbb

Please sign in to comment.