group(function () { Route::get('employee/form/{element}', 'EmployeeAPIController@form'); Route::resource('employee', 'EmployeeAPIController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for employees Route::prefix('{guard}/employee')->group(function () { Route::get('employee/form/{element}', 'EmployeeAPIController@form'); Route::apiResource('employee', 'EmployeeAPIController'); }); // Public routes for employees Route::get('employee/Employee', 'EmployeePublicController@getEmployee'); } ); }