public function dischargeFrom(Carbon $date = null) { if (!is_null($this->discharge_date)) { return false; } if (is_null($date)) { $date = Carbon::now(); } $this->discharge_date = $date; $this->save(); return $this->discharge_date; }