diff --git a/src/Providers/LaravelServiceProvider.php b/src/Providers/LaravelServiceProvider.php index 0ef8cb1..82062f7 100644 --- a/src/Providers/LaravelServiceProvider.php +++ b/src/Providers/LaravelServiceProvider.php @@ -22,11 +22,11 @@ public function register() public function boot() { - $formatter = $this->app['config']->get('response.format.0',\Jiannei\Response\Laravel\Support\Format::class); - $config = $this->app['config']->get('response.format.1',[]); + $formatter = $this->app['config']->get('response.format.0', \Jiannei\Response\Laravel\Support\Format::class); + $config = $this->app['config']->get('response.format.1', []); if (is_string($formatter) && class_exists($formatter)) { - $this->app->bind(\Jiannei\Response\Laravel\Contracts\Format::class, function () use ($formatter,$config) { + $this->app->bind(\Jiannei\Response\Laravel\Contracts\Format::class, function () use ($formatter, $config) { return new $formatter($config); }); }