src/YandexTaxiServiceProvider.php
/**
     * Register the service provider.
     *
     * @return void
     */
Register the service provider.
@return void
Register the service provider . @return void
public function register()
    {
        $this->app->singleton('yandex_taxi', function() {
            $client_id = config('yandex_taxi.client_id');
            $api_key = config('yandex_taxi.api_key');
            $park_id = config('yandex_taxi.park_id');
            $proxy = config('yandex_taxi.proxy');
            $client = new Client($client_id, $api_key, $park_id);
            if ($proxy) {
                $client->setProxy($proxy);
            }
            return $client;
        });
    }
public function register ( ) { $ this -> app -> singleton ( 'yandex_taxi' , function ( ) { $ client_id = config ( 'yandex_taxi.client_id' ) ; $ api_key = config ( 'yandex_taxi.api_key' ) ; $ park_id = config ( 'yandex_taxi.park_id' ) ; $ proxy = config ( 'yandex_taxi.proxy' ) ; $ client = new Client ( $ client_id , $ api_key , $ park_id ) ; if ( $ proxy ) { $ client -> setProxy ( $ proxy ) ; } return $ client ; } ) ; }
Register the service provider.
Register the service provider .