Files
SkinbaseNova/.deploy/artwork-evolution-release/app/Observers/ArtworkFeatureObserver.php
2026-04-18 17:02:56 +02:00

40 lines
897 B
PHP

<?php
declare(strict_types=1);
namespace App\Observers;
use App\Models\ArtworkFeature;
use App\Services\HomepageService;
final class ArtworkFeatureObserver
{
public function __construct(private readonly HomepageService $homepage)
{
}
public function created(ArtworkFeature $feature): void
{
$this->homepage->clearFeaturedAndMedalCaches();
}
public function updated(ArtworkFeature $feature): void
{
$this->homepage->clearFeaturedAndMedalCaches();
}
public function deleted(ArtworkFeature $feature): void
{
$this->homepage->clearFeaturedAndMedalCaches();
}
public function restored(ArtworkFeature $feature): void
{
$this->homepage->clearFeaturedAndMedalCaches();
}
public function forceDeleted(ArtworkFeature $feature): void
{
$this->homepage->clearFeaturedAndMedalCaches();
}
}