/** * This method controls what happens when you move to /employee/editSave in your app. * Edits a employee (performs the editing after form submit). * POST request. */ public function editSave() { EmployeeModel::updateEmployee(Request::post('user_account_type')); if (Request::post('user_account_type') == 4) { Redirect::to('employee'); } else { Redirect::to('admin'); } }
/** * This method controls what happens when you move to /employee/editSave in your app. * Edits a employee (performs the editing after form submit). * POST request. */ public function editSave() { EmployeeModel::updateEmployee(Request::post('user_account_type')); Redirect::to('employee'); }