group(function () { Route::resource('instructor', 'InstructorResourceController'); }); // Public routes for instructor Route::get('instructors/', 'InstructorPublicController@index'); Route::get('instructor/{slug?}', 'InstructorPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for instructor Route::prefix('{guard}/instructor')->group(function () { Route::resource('instructor', 'InstructorResourceController'); }); // Public routes for instructor Route::get('instructors/', 'InstructorPublicController@index'); Route::get('instructor/{slug?}', 'InstructorPublicController@show'); } ); }