Save workspace changes
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
<?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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user