defer provider
This commit is contained in:
parent
08084914d0
commit
f909b69cdc
|
@ -31,6 +31,7 @@ class Client
|
||||||
$stream->setFormatter(new $this->config['log_formatter']());
|
$stream->setFormatter(new $this->config['log_formatter']());
|
||||||
$logger = new Logger('RPC.LOGGER');
|
$logger = new Logger('RPC.LOGGER');
|
||||||
$logger->pushHandler($stream);
|
$logger->pushHandler($stream);
|
||||||
|
$logger->info('call client rpc');
|
||||||
$this->id = 0;
|
$this->id = 0;
|
||||||
$this->logger = $logger;
|
$this->logger = $logger;
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,6 @@ class ClientServiceProvider extends ServiceProvider
|
||||||
public function register()
|
public function register()
|
||||||
{
|
{
|
||||||
$this->app->configure('rpc');
|
$this->app->configure('rpc');
|
||||||
$this->app->log->info("call client service provider log");
|
|
||||||
$config = config('rpc.client');
|
$config = config('rpc.client');
|
||||||
|
|
||||||
$this->app->singleton('rpc', function () use ($config) {
|
$this->app->singleton('rpc', function () use ($config) {
|
||||||
|
@ -35,6 +34,6 @@ class ClientServiceProvider extends ServiceProvider
|
||||||
|
|
||||||
public function provides()
|
public function provides()
|
||||||
{
|
{
|
||||||
return parent::provides(); // TODO: Change the autogenerated stub
|
return ['rpc'];
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user