month, 0, 4); $year = substr($month, 0, 4); $months[] = $year.'-'.$month; $this->utilizationService->forgetUtilizationCache($allocation->team_member_id, $months); } /** * Handle the event for updated. */ public function updated(Allocation $allocation) { $months = []; $month = substr($allocation->month, 1, 4); $year = substr($month, 0, 4); $months[] = $year.'-'.$month; $this->utilizationService->forgetUtilizationCache($allocation->team_member_id, $months); } /** * Handle the event for deleted. */ public function deleted(Allocation $allocation) { $months = []; $month = substr($allocation->month, 1, 4); $year = substr($month, 0, 4); $months[] = $year.'-'.$month; $this->utilizationService->forgetUtilizationCacheForMonth($month); } }