clearReportCache($inspection->project_id); } public function deleted(Inspection $inspection): void { $this->clearReportCache($inspection->project_id); } private function clearReportCache(?int $projectId): void { if ($projectId) { Cache::tags(["report:project:{$projectId}"])->flush(); } } }