src/Laravel/LaragramServiceProvider.php
public function register()
    {
        $this->app->singleton('Williamson\Laragram\TgCommands', function () {
            try {
                $tg = new TgCommands(Config::get('services.telegram.socket'));
            } catch (ClientException $e) {
                Log::error($e->getMessage());

                return;
            }

            return $tg;
        });
    }
public function register()
    {
        $this->app->singleton('Williamson\Laragram\TgCommands', function () {
            try {
                $tg = new TgCommands(Config::get('services.telegram.socket'));
            } catch (ClientException $e) {
                Log::error($e->getMessage());

                return;
            }

            return $tg;
        });
    }
public function register ( ) { $ this -> app -> singleton ( 'Williamson\Laragram\TgCommands' , function ( ) { try { $ tg = new TgCommands ( Config :: get ( 'services.telegram.socket' ) ) ; } catch ( ClientException $ e ) { Log :: error ( $ e -> getMessage ( ) ) ; return ; } return $ tg ; } ) ; }
Register the application services.

@return void
Register the application services .