update v1.0.7.9 R.C.

This is a Release Candidate. We are still testing.
This commit is contained in:
Sujit Prasad
2016-08-03 20:04:36 +05:30
parent 8b6b924d09
commit ffa56a43cb
3830 changed files with 181529 additions and 495353 deletions

View File

@@ -0,0 +1,45 @@
<?php namespace LaravelFCM;
use Illuminate\Support\ServiceProvider;
use LaravelFCM\Sender\FCMSender;
use LaravelFCM\Sender\FCMGroup;
class FCMServiceProvider extends ServiceProvider {
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()
{
$this->app->bind('fcm.group', function($app) {
return new FCMGroup();
});
$this->app->bind('fcm.sender', function($app) {
return new FCMSender();
});
$this->registerClient();
}
public function registerClient()
{
$this->app->singleton('fcm.client', function($app) {
return (new FCMManager($app))->driver();
});
}
protected function provide()
{
return [ 'fcm', 'fcm.client' ];
}
}