Skip to content

A free open source IT asset/license management system

Group custom controller routes

Marcus Moore3381d4340cc2
diff --git a/routes/web.php b/routes/web.php
index 068dd8c406..d381471528 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -501,13 +501,15 @@ Route::group(['prefix' => 'reports', 'middleware' => ['auth']], function () {
Route::get('export/accessories', [ReportsController::class, 'exportAccessoryReport'])
->name('reports/export/accessories');
- Route::get('custom', [ReportsController::class, 'getCustomReport'])
- ->name('reports/custom')
- ->breadcrumbs(fn (Trail $trail) => $trail->parent('home')
- ->push(trans('general.custom_report'), route('reports/custom')));
-
- Route::post('custom', [ReportsController::class, 'postCustom'])
- ->name('reports.post-custom');
+ Route::group(['prefix' => 'custom'], function () {
+ Route::get('/', [ReportsController::class, 'getCustomReport'])
+ ->name('reports/custom')
+ ->breadcrumbs(fn (Trail $trail) => $trail->parent('home')
+ ->push(trans('general.custom_report'), route('reports/custom')));
+
+ Route::post('/', [ReportsController::class, 'postCustom'])
+ ->name('reports.post-custom');
+ });
Route::prefix('templates')
->group(function () {