group(function () { Route::get('workflow/form/{element}', 'WorkflowAPIController@form'); Route::resource('workflow', 'WorkflowAPIController'); }); // Public routes for workflow Route::get('roles/', 'WorkflowPublicController@index'); Route::get('roles/{slug?}', 'WorkflowPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for roles Route::prefix('{guard}/role')->group(function () { Route::get('workflow/form/{element}', 'WorkflowAPIController@form'); Route::apiResource('workflow', 'WorkflowAPIController'); }); // Public routes for roles Route::get('role/Workflow', 'WorkflowPublicController@getWorkflow'); } ); } // API routes for role Route::prefix('{guard}/role')->group(function () { Route::get('role/form/{element}', 'RoleAPIController@form'); Route::resource('role', 'RoleAPIController'); }); // Public routes for role Route::get('roles/', 'RolePublicController@index'); Route::get('roles/{slug?}', 'RolePublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for roles Route::prefix('{guard}/role')->group(function () { Route::get('role/form/{element}', 'RoleAPIController@form'); Route::apiResource('role', 'RoleAPIController'); }); // Public routes for roles Route::get('role/Role', 'RolePublicController@getRole'); } ); } // API routes for permission Route::prefix('{guard}/role')->group(function () { Route::get('permission/form/{element}', 'PermissionAPIController@form'); Route::resource('permission', 'PermissionAPIController'); }); // Public routes for permission Route::get('roles/', 'PermissionPublicController@index'); Route::get('roles/{slug?}', 'PermissionPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for roles Route::prefix('{guard}/role')->group(function () { Route::get('permission/form/{element}', 'PermissionAPIController@form'); Route::apiResource('permission', 'PermissionAPIController'); }); // Public routes for roles Route::get('role/Permission', 'PermissionPublicController@getPermission'); } ); } // API routes for label Route::prefix('{guard}/role')->group(function () { Route::get('label/form/{element}', 'LabelAPIController@form'); Route::resource('label', 'LabelAPIController'); }); // Public routes for label Route::get('roles/', 'LabelPublicController@index'); Route::get('roles/{slug?}', 'LabelPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for roles Route::prefix('{guard}/role')->group(function () { Route::get('label/form/{element}', 'LabelAPIController@form'); Route::apiResource('label', 'LabelAPIController'); }); // Public routes for roles Route::get('role/Label', 'LabelPublicController@getLabel'); } ); }