From b6aae1f8a978d3528261e31db1aea408eadb6de7 Mon Sep 17 00:00:00 2001 From: Marcus Moore Date: Tue, 22 Oct 2024 17:30:34 -0700 Subject: [PATCH] Group routes --- routes/web.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/routes/web.php b/routes/web.php index 1391976857..6455534762 100644 --- a/routes/web.php +++ b/routes/web.php @@ -381,11 +381,13 @@ Route::group(['middleware' => ['auth']], function () { Route::get('reports/custom', [ReportsController::class, 'getCustomReport'])->name('reports/custom'); Route::post('reports/custom', [ReportsController::class, 'postCustom']); - Route::post('reports/templates', [ReportTemplatesController::class, 'store'])->name('report-templates.store'); - Route::get('reports/templates/{reportId}', [ReportTemplatesController::class, 'show'])->name('report-templates.show'); - Route::get('reports/templates/{reportId}/edit', [ReportTemplatesController::class, 'edit'])->name('report-templates.edit'); - Route::post('reports/templates/{reportId}', [ReportTemplatesController::class, 'update'])->name('report-templates.update'); - Route::delete('reports/templates/{reportId}', [ReportTemplatesController::class, 'destroy'])->name('report-templates.destroy'); + Route::prefix('reports/templates')->name('report-templates')->group(function () { + Route::post('/', [ReportTemplatesController::class, 'store'])->name('.store'); + Route::get('/{reportId}', [ReportTemplatesController::class, 'show'])->name('.show'); + Route::get('/{reportId}/edit', [ReportTemplatesController::class, 'edit'])->name('.edit'); + Route::post('/{reportId}', [ReportTemplatesController::class, 'update'])->name('.update'); + Route::delete('/{reportId}', [ReportTemplatesController::class, 'destroy'])->name('.destroy'); + }); Route::get( 'reports/activity',