diff --git a/src/SitemapSubscriber.php b/src/SitemapSubscriber.php index 9f4ddab..b9a561c 100644 --- a/src/SitemapSubscriber.php +++ b/src/SitemapSubscriber.php @@ -7,7 +7,6 @@ use Statamic\Events\EntryDeleted; use Illuminate\Events\Dispatcher; use Illuminate\Support\Facades\Cache; -use Statamic\Entries\Entry; class SitemapSubscriber { @@ -29,10 +28,10 @@ public function subscribe(Dispatcher $events): array * Flush the sitemap cache * */ - public function flushSitemapCache(Entry $entry) + public function flushSitemapCache($event) { - Cache::forget('seotamic_sitemap_should_be_indexed' . $entry->id()); - Cache::forge('seotamic_sitemap_sitemap_entry', $entry->id()); + Cache::forget('seotamic_sitemap_should_be_indexed' . $event->entry->id()); + Cache::forget('seotamic_sitemap_sitemap_entry', $event->entry->id()); Cache::forget('seotamic_sitemap'); } }