Files
ntspi-app/app/Observers/SubSectionObserver.php
T
F4ilji c01016a154 Migrate backend to Porto architecture and fix minor bugs
- Fully transitioned the backend to the Porto architectural pattern
- Improved code organization and maintainability
- Fixed minor bugs and inconsistencies
2025-05-12 08:47:43 +05:00

35 lines
763 B
PHP

<?php
namespace App\Observers;
use App\Containers\AppStructure\Models\SubSection;
use Illuminate\Support\Facades\Cache;
class SubSectionObserver
{
public function created(SubSection $subSection): void
{
Cache::forget('navigation');
}
/**
* Очистка кеша при обновлении SubSection.
*
* @param SubSection $subSection
* @return void
*/
public function updated(SubSection $subSection)
{
Cache::forget('navigation');
}
/**
* Очистка кеша при удалении SubSection.
*
* @param SubSection $subSection
* @return void
*/
public function deleted(SubSection $subSection)
{
Cache::forget('navigation');
}
}