@@ -8,7 +8,7 @@ Installation
88
99Update your ` composer.json ` file to include this package as a dependency
1010
11- Laravel 5
11+ Laravel 5 & Lumen
1212
1313``` json
1414"davibennun/laravel-push-notification" : " dev-laravel5"
@@ -36,7 +36,7 @@ Alias the PushNotification facade by adding it to the aliases array in the `app/
3636
3737# Configuration
3838
39- Copy the config file into your project by running
39+ Copy the config file into your project by running: (Lumen users skip this)
4040
4141Laravel 5
4242``` php
@@ -84,6 +84,23 @@ PushNotification::app('appNameIOS')
8484
8585```
8686Where app argument ` appNameIOS ` refers to defined service in config file.
87+
88+ ###Dynamic configuration and Lumen users
89+ You can set the app config array directly: (keep in mind the array schema)
90+ ``` php
91+ //iOS app
92+ PushNotification::app(['environment' => 'development',
93+ 'certificate' => '/path/to/certificate.pem',
94+ 'passPhrase' => 'password',
95+ 'service' => 'apns']);
96+ //Android app
97+ PushNotification::app(['environment' => 'production',
98+ 'apiKey' => 'yourAPIKey',
99+ 'service' => 'gcm']);
100+
101+ ```
102+
103+
87104To multiple devices and optioned message:
88105``` php
89106$devices = PushNotification::DeviceCollection(array(
@@ -108,7 +125,7 @@ $message = PushNotification::Message('Message Text',array(
108125 ))
109126));
110127
111- collection = PushNotification::app('appNameIOS')
128+ $ collection = PushNotification::app('appNameIOS')
112129 ->to($devices)
113130 ->send($message);
114131
0 commit comments