for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace NotificationChannels\Intercom;
use Illuminate\Container\Container;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\Notification;
use Illuminate\Support\ServiceProvider;
use Intercom\IntercomClient;
class IntercomServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application services.
*/
public function boot(): void
$this->app->when(IntercomChannel::class)
->needs(IntercomClient::class)
->give(static function () {
/* @var Config $config */
return new IntercomClient(
Config::get('services.intercom.token', ''),
null
);
});
}
* Register any package services.
public function register(): void
Notification::extend('intercom', static function (Container $app) {
return $app->make(IntercomChannel::class);