Skip to content

Commit e3c6556

Browse files
committed
Merge branch 'laravel5'
# Conflicts: # src/Davibennun/LaravelPushNotification/PushNotification.php
2 parents fe9640a + 6970bbe commit e3c6556

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ php artisan vendor:publish --provider="Davibennun\LaravelPushNotification\Larave
4545

4646
Laravel 4.*
4747
```
48-
php artisan config:publish davibennun/laravel-push-notification
48+
php artisan vendor:publish --provider="Vendor/Davibennun/LaravelPushNotification/LaravelPushNotificationServiceProvider" --tag="config"
4949
```
5050

5151
This will generate a config file like this

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "davibennun/laravel-push-notification",
33
"description": "Laravel package to send push notifications to mobile devices (apns, gcm)",
4-
"keywords": ["apns","gcm","push","notification", "laravel"],
4+
"keywords": ["apns","gcm","push","notification", "laravel"],
55
"authors": [
66
{
77
"name": "DaviBenNun",
@@ -10,7 +10,7 @@
1010
],
1111
"require": {
1212
"php": ">=5.3.0",
13-
"illuminate/support": "4.*",
13+
"illuminate/support": "5.*",
1414
"sly/notification-pusher": "2.*"
1515
},
1616
"autoload": {

src/Davibennun/LaravelPushNotification/LaravelPushNotificationServiceProvider.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ class LaravelPushNotificationServiceProvider extends ServiceProvider {
1919
*/
2020
public function boot()
2121
{
22-
$this->package('davibennun/laravel-push-notification');
22+
$config_path = function_exists('config_path') ? config_path('push-notification.php') : 'push-notification.php';
23+
$this->publishes([
24+
__DIR__.'/../../config/config.php' => $config_path
25+
], 'config');
2326
}
2427

2528
/**
@@ -29,8 +32,7 @@ public function boot()
2932
*/
3033
public function register()
3134
{
32-
$this->app['pushNotification'] = $this->app->share(function($app)
33-
{
35+
$this->app->singleton('pushNotification', function ($app) {
3436
return new PushNotification();
3537
});
3638
}
@@ -45,4 +47,4 @@ public function provides()
4547
return array();
4648
}
4749

48-
}
50+
}

0 commit comments

Comments
 (0)