group(function () { Route::resource('role', 'RoleResourceController'); }); // Guard routes for permission Route::prefix('{guard}/role')->group(function () { Route::resource('permission', 'PermissionResourceController'); }); // Public routes for role Route::get('roles/', 'RolePublicController@index'); Route::get('role/{slug?}', 'RolePublicController@show');