forked from barryvdh/laravel-debugbar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdebugbar-routes.php
42 lines (35 loc) · 1.25 KB
/
debugbar-routes.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
$routeConfig = [
'namespace' => 'Barryvdh\Debugbar\Controllers',
'prefix' => app('config')->get('debugbar.route_prefix'),
'domain' => app('config')->get('debugbar.route_domain'),
'middleware' => array_merge(app('config')->get('debugbar.route_middleware', []), [\Barryvdh\Debugbar\Middleware\DebugbarEnabled::class]),
];
app('router')->group($routeConfig, function ($router) {
$router->get('open', [
'uses' => 'OpenHandlerController@handle',
'as' => 'debugbar.openhandler',
]);
$router->get('clockwork/{id}', [
'uses' => 'OpenHandlerController@clockwork',
'as' => 'debugbar.clockwork',
]);
if (class_exists(\Laravel\Telescope\Telescope::class)) {
$router->get('telescope/{id}', [
'uses' => 'TelescopeController@show',
'as' => 'debugbar.telescope',
]);
}
$router->get('assets/stylesheets', [
'uses' => 'AssetController@css',
'as' => 'debugbar.assets.css',
]);
$router->get('assets/javascript', [
'uses' => 'AssetController@js',
'as' => 'debugbar.assets.js',
]);
$router->delete('cache/{key}/{tags?}', [
'uses' => 'CacheController@delete',
'as' => 'debugbar.cache.delete',
]);
});