group(function () { Route::resource('employee', 'EmployeeResourceController'); }); 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', 'EmployeeResourceController'); }); // Public routes for pages Route::get('employees/', 'EmployeePublicController@index'); Route::get('employees/{slug?}', 'EmployeePublicController@show'); } ); }