Skip to content

Commit

Permalink
Backport reflash fix to v2.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
barryvdh committed Feb 17, 2016
1 parent 974fd16 commit 3fab290
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
16 changes: 12 additions & 4 deletions src/Controllers/BaseController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,21 @@

use Barryvdh\Debugbar\LaravelDebugbar;
use Illuminate\Routing\Controller;
use Illuminate\Http\Request;

if (class_exists('Illuminate\Routing\Controller')) {

class BaseController extends Controller
{
protected $debugbar;

public function __construct(LaravelDebugbar $debugbar)
public function __construct(Request $request, LaravelDebugbar $debugbar)
{
$this->debugbar = $debugbar;

if ($request->hasSession()){
$request->session()->reflash();
}
}
}

Expand All @@ -21,10 +26,13 @@ class BaseController
{
protected $debugbar;

public function __construct(LaravelDebugbar $debugbar)
public function __construct(Request $request, LaravelDebugbar $debugbar)
{
$this->debugbar = $debugbar;

if ($request->hasSession()){
$request->session()->reflash();
}
}
}
}

}
4 changes: 0 additions & 4 deletions src/LaravelDebugbar.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,6 @@ public function boot()
return;
}

if ($this->isDebugbarRequest()) {
$this->app['session']->reflash();
}

/** @var \Barryvdh\Debugbar\LaravelDebugbar $debugbar */
$debugbar = $this;

Expand Down

0 comments on commit 3fab290

Please sign in to comment.