extend('echomail', function ($app) { return new EchomailChannel($app->make(Echomail::class)); }); $service->extend('netmail', function ($app) { return new NetmailChannel($app->make(Netmail::class)); }); $service->extend('matrix', function ($app) { return new MatrixChannel($app->make(Echomail::class)); }); }); } /** * Bootstrap any application services. * * @return void */ public function boot() { static::bootSingle(); // Add our page assets Blade::directive('pa',function($expression) { return sprintf('',$expression); }); Auth::viaRequest('matrix-token',function (Request $request) { return (config('matrix.hs_token') && ($request->bearerToken() === config('matrix.hs_token'))) ? TRUE : NULL; }); // Mailer Admin Gate::define('admin',fn(User $o)=>($o->admin === TRUE)); // ZC of a Zone Gate::define('zc',fn(User $o)=>(($o->admin === TRUE) || $o->ZC())); Event::listen( Message::class, MessageListener::class, ); // @todo This should be detected automatically? Event::listen( EchomailEvent::class, EchomailListener::class, ); } }