You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
772 B
36 lines
772 B
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Channels\FcmChannel;
|
|
use Illuminate\Notifications\ChannelManager;
|
|
use Illuminate\Support\Facades\Notification;
|
|
use Illuminate\Support\ServiceProvider;
|
|
use GuzzleHttp\Client as HttpClient;
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Register any application services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function register()
|
|
{
|
|
Notification::resolved(function (ChannelManager $service) {
|
|
$service->extend('fcm', function ($app) {
|
|
return new FcmChannel(new HttpClient, config('fcm.key'));
|
|
});
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Bootstrap any application services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function boot()
|
|
{
|
|
//
|
|
}
|
|
}
|