Skip to content

Commit b1767bd

Browse files
committed
Merge pull request barryvdh#301 from forumhouseteam/master_with_route_prefix
Route prefix made configurable (Laravel 5)
2 parents 7bdf8ac + 421728d commit b1767bd

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

config/debugbar.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,4 +142,16 @@
142142

143143
'inject' => true,
144144

145+
/*
146+
|--------------------------------------------------------------------------
147+
| DebugBar route prefix
148+
|--------------------------------------------------------------------------
149+
|
150+
| Sometimes you want to set route prefix to be used by DebugBar to load
151+
| its resources from. Usually the need comes from misconfigured web server or
152+
| from trying to overcome bugs like this: http://trac.nginx.org/nginx/ticket/97
153+
|
154+
*/
155+
'route_prefix' => '_debugbar',
156+
145157
);

src/ServiceProvider.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,9 @@ public function boot()
6565

6666
$routeConfig = [
6767
'namespace' => 'Barryvdh\Debugbar\Controllers',
68-
'prefix' => '_debugbar',
68+
'prefix' => $this->app['config']->get('debugbar.route_prefix'),
6969
];
70+
7071
$this->app['router']->group($routeConfig, function($router) {
7172
$router->get('open', [
7273
'uses' => 'OpenHandlerController@handle',

0 commit comments

Comments
 (0)