From dbddbcb69faa6fecf378ce09043bf00286ab39e4 Mon Sep 17 00:00:00 2001 From: andriyandriyan Date: Wed, 27 May 2020 07:10:23 +0700 Subject: [PATCH] Add installation instruction for Lumen --- readme.md | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/readme.md b/readme.md index ff959a6..6fa8255 100644 --- a/readme.md +++ b/readme.md @@ -10,7 +10,9 @@ You can pull the package via composer : $ composer require kawankoding/laravel-fcm "^0.2.0" ``` -Next, You must register the service provider : +#### Laravel + +You must register the service provider : ```php // config/app.php @@ -53,6 +55,24 @@ return [ ]; ``` +#### Lumen + +Add the following service provider to the `bootstrap/app.php` file +```php +$app->register(Kawankoding\Fcm\FcmServiceProvider::class); +``` + +Also copy the [laravel-fcm.php](https://github.com/kawankoding/laravel-fcm/blob/master/resources/config/laravel-fcm.php) config file to `config/laravel-fcm.php` + + +Add the configuration to the `bootstrap/app.php` file + *Important:* this needs to be before the registration of the service provider +```php +$app->configure('laravel-fcm'); +... +$app->register(Kawankoding\Fcm\FcmServiceProvider::class); +``` + Set your FCM Server Key in `.env` file : ```