find($this->artworkId); if (! $artwork) { return; } if (! $artwork->is_public || ! $artwork->is_approved || ! $artwork->published_at) { // Not public/approved — ensure it is removed from the index. $artwork->unsearchable(); return; } $artwork->searchable(); } public function failed(\Throwable $e): void { Log::error('IndexArtworkJob failed', [ 'artwork_id' => $this->artworkId, 'error' => $e->getMessage(), ]); } }