Skip to content

Commit b9eda8a

Browse files
committed
Added L5.5 providers auto-discovery
1 parent 3975e61 commit b9eda8a

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,25 @@ composer require dreamonkey/laravel-onesignal-rest-api
1414
```
1515

1616
## Laravel Users:
17+
From Laravel 5.5 onwards, it's possible to take advantage of auto-discovery of the service provider.
18+
19+
For Laravel versions before 5.5, you must register the service provider in your config/app.php
20+
1721
Update `config/app.php` by adding the following entries.
1822
```php
1923
'providers' => [
20-
// ...
21-
Dreamonkey\OneSignal\OneSignalServiceProvider::class,
24+
// ...
25+
Dreamonkey\OneSignal\OneSignalServiceProvider::class,
2226
];
2327

2428
'aliases' => [
2529
// ...
2630
'OneSignal' => Dreamonkey\OneSignal\Facades\OneSignal::class,
27-
];
31+
];
2832
```
2933

3034
## Lumen Users:
31-
update `bootstrap/app.php`, adding the following entry
35+
Update `bootstrap/app.php`, adding the following entry
3236
```php
3337
$app->register( \Dreamonkey\OneSignal\OneSignalServiceProvider::class );
3438
class_alias( 'Dreamonkey\OneSignal\OneSignalFacade', 'OneSignal' );

composer.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,16 @@
1717
"Dreamonkey\\OneSignal\\": "src/"
1818
}
1919
},
20+
"extra": {
21+
"laravel": {
22+
"providers": [
23+
"Dreamonkey\\OneSignal\\OneSignalServiceProvider"
24+
],
25+
"aliases": {
26+
"OneSignal": "Dreamonkey\\OneSignal\\Facades\\OneSignal"
27+
}
28+
}
29+
},
2030
"license": "MIT",
2131
"authors": [
2232
{

0 commit comments

Comments
 (0)