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