group(function () { Route::resource('college', 'CollegeResourceController'); }); // Guard routes for student Route::prefix('{guard}/college')->group(function () { Route::resource('student', 'StudentResourceController'); }); // Guard routes for guardian Route::prefix('{guard}/college')->group(function () { Route::resource('guardian', 'GuardianResourceController'); }); // Guard routes for teacher Route::prefix('{guard}/college')->group(function () { Route::resource('teacher', 'TeacherResourceController'); }); // Public routes for college Route::get('colleges/', 'CollegePublicController@index'); Route::get('college/{slug?}', 'CollegePublicController@show');