/**
  * Create an instance of the smsclub driver
  *
  * @return SmsClub
  */
 public function createSmsclubDriver()
 {
     $config = $this->app['config']->get('sms.smsclub', []);
     $driver = new SmsClub(new Client());
     $driver->buildBody(['username' => $config['login'], 'password' => $config['password'], 'lifetime' => 60 * 24 * 30]);
     return $driver;
 }
 public function registerSender()
 {
     parent::registerSender();
     $sender = $this->app['sms.sender'];
     $sender->extend('smsru', function ($app) {
         $config = $app['config']->get('sms.smsru', []);
         $driver = new SmsRu(new Client());
         $driver->buildBody(['api_id' => $config['api_id']]);
         return $driver;
     });
     $sender->extend('smscenter', function ($app) {
         $config = $app['config']->get('sms.smscenter', []);
         $driver = new SmsCenter(new Client());
         $driver->buildBody(['login' => $config['login'], 'psw' => $config['password']]);
         return $driver;
     });
     $sender->extend('smsclub', function ($app) {
         $config = $app['config']->get('sms.smsclub', []);
         $driver = new SmsClub(new Client());
         $driver->buildBody(['username' => $config['login'], 'password' => $config['password'], 'lifetime' => 60 * 24 * 30]);
         return $driver;
     });
 }