12-05-2026 Frontend dev
This commit is contained in:
parent
405df0a122
commit
5b8bdf4182
779 changed files with 480564 additions and 6241 deletions
39
app/Observers/AdminPerformanceCacheObserver.php
Normal file
39
app/Observers/AdminPerformanceCacheObserver.php
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
|
||||
namespace App\Observers;
|
||||
|
||||
use App\Services\Admin\AdminPerformanceCache;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class AdminPerformanceCacheObserver
|
||||
{
|
||||
public function created(Model $model): void
|
||||
{
|
||||
$this->flush();
|
||||
}
|
||||
|
||||
public function updated(Model $model): void
|
||||
{
|
||||
$this->flush();
|
||||
}
|
||||
|
||||
public function deleted(Model $model): void
|
||||
{
|
||||
$this->flush();
|
||||
}
|
||||
|
||||
public function restored(Model $model): void
|
||||
{
|
||||
$this->flush();
|
||||
}
|
||||
|
||||
public function forceDeleted(Model $model): void
|
||||
{
|
||||
$this->flush();
|
||||
}
|
||||
|
||||
private function flush(): void
|
||||
{
|
||||
app(AdminPerformanceCache::class)->flush();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue