public function register()
    {
        $l5 = $this->l5 = version_compare(Application::VERSION, '5.0', '>=');

        $factory = function ($app) use($l5) {
            $delim = $l5 ? '.' : '::';
            $config = $app['config'];
            $username  = $config->get("bulk-sms{$delim}username");
            $password  = $config->get("bulk-sms{$delim}password");
            $baseurl   = $config->get("bulk-sms{$delim}baseurl");

            $curl = isset($app['curl']) ? $app['curl'] : null;

            return new BulkSmsService($username, $password, $baseurl, $curl);
        };

        if (version_compare(Application::VERSION, '5.4', '>=')) {
            $this->app->singleton('bulksms', $factory);
        } else {
            $this->app['bulksms'] = $this->app->share($factory);
        }


        if ($l5) {
            $dir = dirname(dirname(__DIR__)).'/resources';
            $this->mergeConfigFrom($dir.'/config.php', 'bulk-sms');
        }
    }