Skip to content

Commit dd51c75

Browse files
committed
Disable Laravel Debugbar on the login screen
We don’t want the public to see this!
1 parent be1e146 commit dd51c75

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/Controllers/StageFrontController.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ public function create()
2323
];
2424
}
2525

26+
$this->disableLaravelDebugbar();
27+
2628
return view('stagefront::login', compact('liveSite'));
2729
}
2830

@@ -45,4 +47,16 @@ public function store()
4547

4648
return redirect()->intended('/');
4749
}
50+
51+
/**
52+
* Disable Laravel Debugbar if it is loaded.
53+
*
54+
* @return void
55+
*/
56+
protected function disableLaravelDebugbar()
57+
{
58+
if (class_exists('\Debugbar')) {
59+
\Debugbar::disable();
60+
}
61+
}
4862
}

0 commit comments

Comments
 (0)