group(function () { Route::get('employee/report/{report}', 'EmployeeReportController'); Route::patch('employee/actions/{action}', 'EmployeeActionsController'); Route::patch('employee/action/{employee}/{action}', 'EmployeeActionController'); Route::patch('employee/workflow/{employee}/{transition}', 'EmployeeWorkflowController'); Route::resource('employee', 'EmployeeResourceController'); }); // Guard routes for document Route::prefix('{guard}/employee')->group(function () { Route::get('document/report/{report}', 'DocumentReportController'); Route::patch('document/actions/{action}', 'DocumentActionsController'); Route::patch('document/action/{document}/{action}', 'DocumentActionController'); Route::patch('document/workflow/{document}/{transition}', 'DocumentWorkflowController'); Route::resource('document', 'DocumentResourceController'); }); // Guard routes for attendance Route::prefix('{guard}/employee')->group(function () { Route::get('attendance/report/{report}', 'AttendanceReportController'); Route::patch('attendance/actions/{action}', 'AttendanceActionsController'); Route::patch('attendance/action/{attendance}/{action}', 'AttendanceActionController'); Route::patch('attendance/workflow/{attendance}/{transition}', 'AttendanceWorkflowController'); Route::resource('attendance', 'AttendanceResourceController'); }); // Guard routes for leave Route::prefix('{guard}/employee')->group(function () { Route::get('leave/report/{report}', 'LeaveReportController'); Route::patch('leave/actions/{action}', 'LeaveActionsController'); Route::patch('leave/action/{leave}/{action}', 'LeaveActionController'); Route::patch('leave/workflow/{leave}/{transition}', 'LeaveWorkflowController'); Route::resource('leave', 'LeaveResourceController'); }); // Public routes for employee Route::get('employees/', 'EmployeePublicController@index'); Route::get('employee/{slug?}', 'EmployeePublicController@show');