protected function updateDepartmentAndStatus($request) { $employee = Employee::create($request->all()); $employee->update(['status' => 'active', 'department' => Station::whereStation($request->station)->first()->department]); return $employee; }
/** * @param $station */ public function delete($station) { Station::whereStation($station)->delete(); }