Skip to content

Commit

Permalink
Support for L5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
kamui545 committed Jan 18, 2017
1 parent d13a954 commit 8e0794b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/LaravelDebugbar.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,11 @@ function () use ($debugbar) {
$this->addCollector(new ViewCollector($collectData));
$this->app['events']->listen(
'composing:*',
function ($name, $view) use ($debugbar) {
$debugbar['views']->addView($view[0]);
function ($view, $data = []) use ($debugbar) {
if ($data) {
$view = $data[0]; // For Laravel >= 5.4
}
$debugbar['views']->addView($view);
}
);
} catch (\Exception $e) {
Expand Down

0 comments on commit 8e0794b

Please sign in to comment.