diff --git a/src/RapidezStatamicServiceProvider.php b/src/RapidezStatamicServiceProvider.php index be77fcb..eac998b 100644 --- a/src/RapidezStatamicServiceProvider.php +++ b/src/RapidezStatamicServiceProvider.php @@ -13,6 +13,7 @@ use Illuminate\Support\Facades\View; use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\Event; +use Illuminate\Support\Facades\Artisan; use Rapidez\Statamic\Tags\Alternates; use Statamic\Events\GlobalSetDeleted; use Illuminate\Support\ServiceProvider; @@ -95,7 +96,7 @@ public function bootListeners() : self { if ($this->currentSiteIsEnabled()) { Event::listen([GlobalSetSaved::class, GlobalSetDeleted::class], function () { - Cache::forget('statamic-globals-' . Site::current()->handle()); + Cache::forget('statamic-globals-' . Site::selected()->handle()); }); Eventy::addFilter('rapidez.statamic.category.entry.data', fn($category) => [