group(function () { Route::get('snagging/report/{report}', 'SnaggingReportController'); Route::patch('snagging/actions/{action}', 'SnaggingActionsController'); Route::patch('snagging/action/{snagging}/{action}', 'SnaggingActionController'); Route::patch('snagging/workflow/{snagging}/{transition}', 'SnaggingWorkflowController'); Route::resource('snagging', 'SnaggingResourceController'); }); // Guard routes for area Route::prefix('{guard}/snagging')->group(function () { Route::patch('area/actions/{action}', 'AreaActionsController'); Route::patch('area/action/{area}/{action}', 'AreaActionController'); Route::resource('area', 'AreaResourceController'); }); // Guard routes for schedule Route::prefix('{guard}/snagging')->group(function () { Route::get('schedule/report/{report}', 'ScheduleReportController'); Route::patch('schedule/actions/{action}', 'ScheduleActionsController'); Route::patch('schedule/action/{schedule}/{action}', 'ScheduleActionController'); Route::patch('schedule/workflow/{schedule}/{transition}', 'ScheduleWorkflowController'); Route::resource('schedule', 'ScheduleResourceController'); }); // Public routes for snagging Route::get('snaggings/', 'SnaggingPublicController@index'); Route::get('snagging/{slug?}', 'SnaggingPublicController@show');