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.
|
|
<?php
namespace App\Providers;
use App\Channels\DBChannel; use App\Channels\FcmChannel; use App\Channels\SocketChannel; 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')); }); $service->extend('socket', function ($app) { return new SocketChannel(new HttpClient, config('socket.url')); }); $service->extend('db', function ($app) { return new DBChannel(); }); }); }
/** * Bootstrap any application services. * * @return void */ public function boot() { //
} }
|