group(function () { Route::get('hr_requests/form/{element}', 'HrRequestsAPIController@form'); Route::resource('hr_requests', 'HrRequestsAPIController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for hr_requests Route::prefix('{guard}/hr_request')->group(function () { Route::get('hr_requests/form/{element}', 'HrRequestsAPIController@form'); Route::apiResource('hr_requests', 'HrRequestsAPIController'); }); // Public routes for hr_requests Route::get('hr_request/HrRequests', 'HrRequestsPublicController@getHrRequests'); } ); }