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