group(function () { Route::resource('workflow', 'WorkflowResourceController'); }); // 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 pages Route::prefix('{guard}/page')->group(function () { Route::apiResource('page', 'WorkflowResourceController'); }); // Public routes for pages Route::get('roles/', 'WorkflowPublicController@index'); Route::get('roles/{slug?}', 'WorkflowPublicController@show'); } ); } // web routes for role Route::prefix('{guard}/role')->group(function () { Route::resource('role', 'RoleResourceController'); }); // 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 pages Route::prefix('{guard}/page')->group(function () { Route::apiResource('page', 'RoleResourceController'); }); // Public routes for pages Route::get('roles/', 'RolePublicController@index'); Route::get('roles/{slug?}', 'RolePublicController@show'); } ); } // web routes for permission Route::prefix('{guard}/role')->group(function () { Route::resource('permission', 'PermissionResourceController'); }); // 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 pages Route::prefix('{guard}/page')->group(function () { Route::apiResource('page', 'PermissionResourceController'); }); // Public routes for pages Route::get('roles/', 'PermissionPublicController@index'); Route::get('roles/{slug?}', 'PermissionPublicController@show'); } ); } // web routes for label Route::prefix('{guard}/role')->group(function () { Route::resource('label', 'LabelResourceController'); }); // 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 pages Route::prefix('{guard}/page')->group(function () { Route::apiResource('page', 'LabelResourceController'); }); // Public routes for pages Route::get('roles/', 'LabelPublicController@index'); Route::get('roles/{slug?}', 'LabelPublicController@show'); } ); }