Laravel version update

Laravel version update
This commit is contained in:
Manish Verma
2018-08-06 18:48:58 +05:30
parent d143048413
commit 126fbb0255
13678 changed files with 1031482 additions and 778530 deletions

View File

@@ -1,49 +1,53 @@
<?php namespace LaravelFCM;
<?php
namespace LaravelFCM;
use LaravelFCM\Sender\FCMGroup;
use LaravelFCM\Sender\FCMSender;
use Illuminate\Support\ServiceProvider;
class FCMServiceProvider extends ServiceProvider {
class FCMServiceProvider extends ServiceProvider
{
protected $defer = true;
protected $defer = true;
public function boot()
{
if (str_contains($this->app->version(), 'Lumen')) {
$this->app->configure('fcm');
} else {
$this->publishes([
__DIR__.'/../config/fcm.php' => config_path('fcm.php'),
]);
}
}
public function boot()
{
if (str_contains($this->app->version(), 'Lumen')) {
$this->app->configure('fcm');
}
else {
$this->publishes([
__DIR__."/../config/fcm.php" => config_path('fcm.php')
]);
}
}
public function register()
{
if (!str_contains($this->app->version(), 'Lumen')) {
$this->mergeConfigFrom(__DIR__.'/../config/fcm.php', 'fcm');
}
public function register()
{
$this->app->singleton('fcm.client', function($app) {
return (new FCMManager($app))->driver();
});
$this->app->singleton('fcm.client', function ($app) {
return (new FCMManager($app))->driver();
});
$this->app->bind('fcm.group', function($app) {
$client = $app[ 'fcm.client' ];
$url = $app[ 'config' ]->get('fcm.http.server_group_url');
$this->app->bind('fcm.group', function ($app) {
$client = $app[ 'fcm.client' ];
$url = $app[ 'config' ]->get('fcm.http.server_group_url');
return new FCMGroup($client, $url);
});
return new FCMGroup($client, $url);
});
$this->app->bind('fcm.sender', function($app) {
$client = $app[ 'fcm.client' ];
$url = $app[ 'config' ]->get('fcm.http.server_send_url');
$this->app->bind('fcm.sender', function ($app) {
$client = $app[ 'fcm.client' ];
$url = $app[ 'config' ]->get('fcm.http.server_send_url');
return new FCMSender($client, $url);
});
}
public function provides()
{
return [ 'fcm.client', 'fcm.group', 'fcm.sender' ];
}
return new FCMSender($client, $url);
});
}
public function provides()
{
return ['fcm.client', 'fcm.group', 'fcm.sender'];
}
}