Skip to content

Commit

Permalink
Merge pull request #72 from BertvanHoekelen/set-correct-dumper-connec…
Browse files Browse the repository at this point in the history
…tion

[bugfix] Fix setting correct connection on dumper instance
  • Loading branch information
mpociot authored Dec 15, 2020
2 parents d269432 + eda9f9d commit e27c7b9
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/DumpServerServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,8 @@ public function register()
'source' => new SourceContextProvider('utf-8', base_path()),
]);

$this->app->when(Dumper::class)->needs('$connection')->give($connection);
$app = $this->app;

VarDumper::setHandler(function ($var) use ($app) {
$app->make(Dumper::class)->dump($var);
VarDumper::setHandler(function ($var) use ($connection) {
$this->app->makeWith(Dumper::class, ['connection' => $connection])->dump($var);
});
}
}

0 comments on commit e27c7b9

Please sign in to comment.