File "TelegramServiceProvider.php"
Full Path: /home/fundopuh/trader.fxex.org/vendor/laravel-notification-channels/telegram/src/TelegramServiceProvider.php
File size: 936 bytes
MIME-type: text/x-php
Charset: utf-8
<?php
namespace NotificationChannels\Telegram;
use GuzzleHttp\Client as HttpClient;
use Illuminate\Notifications\ChannelManager;
use Illuminate\Support\Facades\Notification;
use Illuminate\Support\ServiceProvider;
/**
* Class TelegramServiceProvider.
*/
class TelegramServiceProvider extends ServiceProvider
{
/**
* Register the application services.
*/
public function register(): void
{
$this->app->bind(Telegram::class, static function () {
return new Telegram(
config('services.telegram-bot-api.token'),
app(HttpClient::class),
config('services.telegram-bot-api.base_uri')
);
});
Notification::resolved(static function (ChannelManager $service) {
$service->extend('telegram', static function ($app) {
return $app->make(TelegramChannel::class);
});
});
}
}