group(function () { Route::patch('opportunity/actions/{action}', 'OpportunityActionsController'); Route::patch('opportunity/action/{opportunity}/{action}', 'OpportunityActionController'); Route::patch('opportunity/workflow/{opportunity}/{transition}', 'OpportunityWorkflowController'); Route::resource('opportunity', 'OpportunityResourceController'); }); // Guard routes for offer Route::prefix('{guard}/opportunity')->group(function () { Route::patch('offer/actions/{action}', 'OfferActionsController'); Route::patch('offer/action/{offer}/{action}', 'OfferActionController'); Route::patch('offer/workflow/{offer}/{transition}', 'OfferWorkflowController'); Route::resource('offer', 'OfferResourceController'); }); // Guard routes for preferance Route::prefix('{guard}/opportunity')->group(function () { Route::patch('preferance/actions/{action}', 'PreferanceActionsController'); Route::patch('preferance/action/{preferance}/{action}', 'PreferanceActionController'); Route::patch('preferance/workflow/{preferance}/{transition}', 'PreferanceWorkflowController'); Route::resource('preferance', 'PreferanceResourceController'); }); // Guard routes for viewing Route::prefix('{guard}/opportunity')->group(function () { Route::patch('viewing/actions/{action}', 'ViewingActionsController'); Route::patch('viewing/action/{viewing}/{action}', 'ViewingActionController'); Route::patch('viewing/workflow/{viewing}/{transition}', 'ViewingWorkflowController'); Route::resource('viewing', 'ViewingResourceController'); }); // Public routes for opportunity Route::get('opportunities/', 'OpportunityPublicController@index'); Route::get('opportunity/{slug?}', 'OpportunityPublicController@show');