@@ -3,6 +3,6 @@ |
||
| 3 | 3 | use Illuminate\Support\Facades\Route; |
| 4 | 4 | use MohsenAbrishami\Stethoscope\Http\Controllers\MonitoringPanelController; |
| 5 | 5 | |
| 6 | -Route::middleware(['check.access.to.monitoring.panel'])->group(function () { |
|
| 7 | - Route::get('monitoring-panel', [MonitoringPanelController::class, 'index'])->name('monitoring-panel'); |
|
| 6 | +Route::middleware([ 'check.access.to.monitoring.panel' ])->group(function() { |
|
| 7 | + Route::get('monitoring-panel', [ MonitoringPanelController::class, 'index' ])->name('monitoring-panel'); |
|
| 8 | 8 | }); |
@@ -8,11 +8,13 @@ |
||
| 8 | 8 | { |
| 9 | 9 | public function handle($request, Closure $next) |
| 10 | 10 | { |
| 11 | - if (!config('stethoscope.monitoring_panel.status')) |
|
| 12 | - abort(404); |
|
| 11 | + if (!config('stethoscope.monitoring_panel.status')) { |
|
| 12 | + abort(404); |
|
| 13 | + } |
|
| 13 | 14 | |
| 14 | - if (config('stethoscope.monitoring_panel.key') && request()->get('key') != config('stethoscope.monitoring_panel.key')) |
|
| 15 | - abort(404); |
|
| 15 | + if (config('stethoscope.monitoring_panel.key') && request()->get('key') != config('stethoscope.monitoring_panel.key')) { |
|
| 16 | + abort(404); |
|
| 17 | + } |
|
| 16 | 18 | |
| 17 | 19 | return $next($request); |
| 18 | 20 | } |