Rework admin panel and other
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
namespace App\Observers;
|
||||
|
||||
use App\Models\AcademicJournal;
|
||||
use App\Services\App\Cache\AcademicJournalCacheService;
|
||||
|
||||
class AcademicJournalObserver
|
||||
{
|
||||
private AcademicJournalCacheService $academicJournalCacheService;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->academicJournalCacheService = app(AcademicJournalCacheService::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the AcademicJournal "created" event.
|
||||
*/
|
||||
public function created(AcademicJournal $academicJournal): void
|
||||
{
|
||||
$this->academicJournalCacheService->clearAllCacheByModel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the AcademicJournal "updated" event.
|
||||
*/
|
||||
public function updated(AcademicJournal $academicJournal): void
|
||||
{
|
||||
$this->academicJournalCacheService->clearCache($academicJournal);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the AcademicJournal "deleted" event.
|
||||
*/
|
||||
public function deleted(AcademicJournal $academicJournal): void
|
||||
{
|
||||
$this->academicJournalCacheService->clearAllCacheByModel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the AcademicJournal "restored" event.
|
||||
*/
|
||||
public function restored(AcademicJournal $academicJournal): void
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the AcademicJournal "force deleted" event.
|
||||
*/
|
||||
public function forceDeleted(AcademicJournal $academicJournal): void
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
namespace App\Observers;
|
||||
|
||||
use App\Models\AdditionalEducation;
|
||||
use App\Services\App\Cache\AdditionalEducationCacheService;
|
||||
|
||||
class AdditionalEducationObserver
|
||||
{
|
||||
private AdditionalEducationCacheService $additionalEducationCacheService;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->additionalEducationCacheService = app(AdditionalEducationCacheService::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the AdditionalEducation "created" event.
|
||||
*/
|
||||
public function created(AdditionalEducation $additionalEducation): void
|
||||
{
|
||||
$this->additionalEducationCacheService->clearAllCacheByModel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the AdditionalEducation "updated" event.
|
||||
*/
|
||||
public function updated(AdditionalEducation $additionalEducation): void
|
||||
{
|
||||
$this->additionalEducationCacheService->clearCache($additionalEducation);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the AdditionalEducation "deleted" event.
|
||||
*/
|
||||
public function deleted(AdditionalEducation $additionalEducation): void
|
||||
{
|
||||
$this->additionalEducationCacheService->clearAllCacheByModel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the AdditionalEducation "restored" event.
|
||||
*/
|
||||
public function restored(AdditionalEducation $additionalEducation): void
|
||||
{
|
||||
$this->additionalEducationCacheService->clearAllCacheByModel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the AdditionalEducation "force deleted" event.
|
||||
*/
|
||||
public function forceDeleted(AdditionalEducation $additionalEducation): void
|
||||
{
|
||||
$this->additionalEducationCacheService->clearAllCacheByModel();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
namespace App\Observers;
|
||||
|
||||
use App\Models\ContactWidget;
|
||||
use App\Services\App\Cache\ContactWidgetCacheService;
|
||||
|
||||
class ContactWidgetObserver
|
||||
{
|
||||
private ContactWidgetCacheService $contactWidgetCacheService;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->contactWidgetCacheService = app(ContactWidgetCacheService::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the ContactWidget "created" event.
|
||||
*/
|
||||
public function created(ContactWidget $contactWidget): void
|
||||
{
|
||||
$this->contactWidgetCacheService->clearAllCacheByModel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the ContactWidget "updated" event.
|
||||
*/
|
||||
public function updated(ContactWidget $contactWidget): void
|
||||
{
|
||||
$this->contactWidgetCacheService->clearCache($contactWidget);
|
||||
$this->contactWidgetCacheService->clearAllCacheByModel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the ContactWidget "deleted" event.
|
||||
*/
|
||||
public function deleted(ContactWidget $contactWidget): void
|
||||
{
|
||||
$this->contactWidgetCacheService->clearCache($contactWidget);
|
||||
$this->contactWidgetCacheService->clearAllCacheByModel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the ContactWidget "restored" event.
|
||||
*/
|
||||
public function restored(ContactWidget $contactWidget): void
|
||||
{
|
||||
$this->contactWidgetCacheService->clearAllCacheByModel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the ContactWidget "force deleted" event.
|
||||
*/
|
||||
public function forceDeleted(ContactWidget $contactWidget): void
|
||||
{
|
||||
$this->contactWidgetCacheService->clearCache($contactWidget);
|
||||
$this->contactWidgetCacheService->clearAllCacheByModel();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
namespace App\Observers;
|
||||
|
||||
use App\Models\Department;
|
||||
use App\Services\App\Cache\DepartmentCacheService;
|
||||
|
||||
class DepartmentObserver
|
||||
{
|
||||
private DepartmentCacheService $departmentCacheService;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->departmentCacheService = app(DepartmentCacheService::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the Department "created" event.
|
||||
*/
|
||||
public function created(Department $department): void
|
||||
{
|
||||
$this->departmentCacheService->clearAllCacheByModel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the Department "updated" event.
|
||||
*/
|
||||
public function updated(Department $department): void
|
||||
{
|
||||
$this->departmentCacheService->clearCache($department);
|
||||
$this->departmentCacheService->clearAllCacheByModel(); // Очищаем и общий кэш, если есть списки
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the Department "deleted" event.
|
||||
*/
|
||||
public function deleted(Department $department): void
|
||||
{
|
||||
$this->departmentCacheService->clearCache($department);
|
||||
$this->departmentCacheService->clearAllCacheByModel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the Department "restored" event.
|
||||
*/
|
||||
public function restored(Department $department): void
|
||||
{
|
||||
$this->departmentCacheService->clearAllCacheByModel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the Department "force deleted" event.
|
||||
*/
|
||||
public function forceDeleted(Department $department): void
|
||||
{
|
||||
$this->departmentCacheService->clearCache($department);
|
||||
$this->departmentCacheService->clearAllCacheByModel();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
namespace App\Observers;
|
||||
|
||||
use App\Models\Division;
|
||||
use App\Services\App\Cache\DivisionCacheService;
|
||||
|
||||
class DivisionObserver
|
||||
{
|
||||
private DivisionCacheService $divisionCacheService;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->divisionCacheService = app(DivisionCacheService::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the Division "created" event.
|
||||
*/
|
||||
public function created(Division $division): void
|
||||
{
|
||||
$this->divisionCacheService->clearAllCacheByModel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the Division "updated" event.
|
||||
*/
|
||||
public function updated(Division $division): void
|
||||
{
|
||||
$this->divisionCacheService->clearCache($division);
|
||||
$this->divisionCacheService->clearAllCacheByModel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the Division "deleted" event.
|
||||
*/
|
||||
public function deleted(Division $division): void
|
||||
{
|
||||
$this->divisionCacheService->clearCache($division);
|
||||
$this->divisionCacheService->clearAllCacheByModel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the Division "restored" event.
|
||||
*/
|
||||
public function restored(Division $division): void
|
||||
{
|
||||
$this->divisionCacheService->clearAllCacheByModel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the Division "force deleted" event.
|
||||
*/
|
||||
public function forceDeleted(Division $division): void
|
||||
{
|
||||
$this->divisionCacheService->clearCache($division);
|
||||
$this->divisionCacheService->clearAllCacheByModel();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
namespace App\Observers;
|
||||
|
||||
use App\Models\EducationalProgram;
|
||||
use App\Services\App\Cache\EducationalProgramCacheService;
|
||||
|
||||
class EducationalProgramObserver
|
||||
{
|
||||
private EducationalProgramCacheService $educationalProgramCacheService;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->educationalProgramCacheService = app(EducationalProgramCacheService::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the EducationalProgram "created" event.
|
||||
*/
|
||||
public function created(EducationalProgram $educationalProgram): void
|
||||
{
|
||||
$this->educationalProgramCacheService->clearAllCacheByModel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the EducationalProgram "updated" event.
|
||||
*/
|
||||
public function updated(EducationalProgram $educationalProgram): void
|
||||
{
|
||||
$this->educationalProgramCacheService->clearCache($educationalProgram);
|
||||
$this->educationalProgramCacheService->clearAllCacheByModel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the EducationalProgram "deleted" event.
|
||||
*/
|
||||
public function deleted(EducationalProgram $educationalProgram): void
|
||||
{
|
||||
$this->educationalProgramCacheService->clearCache($educationalProgram);
|
||||
$this->educationalProgramCacheService->clearAllCacheByModel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the EducationalProgram "restored" event.
|
||||
*/
|
||||
public function restored(EducationalProgram $educationalProgram): void
|
||||
{
|
||||
$this->educationalProgramCacheService->clearAllCacheByModel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the EducationalProgram "force deleted" event.
|
||||
*/
|
||||
public function forceDeleted(EducationalProgram $educationalProgram): void
|
||||
{
|
||||
$this->educationalProgramCacheService->clearCache($educationalProgram);
|
||||
$this->educationalProgramCacheService->clearAllCacheByModel();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
namespace App\Observers;
|
||||
|
||||
use App\Models\Event;
|
||||
use App\Services\App\Cache\EventCacheService;
|
||||
|
||||
class EventObserver
|
||||
{
|
||||
private EventCacheService $eventCacheService;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->eventCacheService = app(EventCacheService::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the Event "created" event.
|
||||
*/
|
||||
public function created(Event $event): void
|
||||
{
|
||||
$this->eventCacheService->clearAllCacheByModel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the Event "updated" event.
|
||||
*/
|
||||
public function updated(Event $event): void
|
||||
{
|
||||
$this->eventCacheService->clearCache($event);
|
||||
$this->eventCacheService->clearAllCacheByModel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the Event "deleted" event.
|
||||
*/
|
||||
public function deleted(Event $event): void
|
||||
{
|
||||
$this->eventCacheService->clearCache($event);
|
||||
$this->eventCacheService->clearAllCacheByModel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the Event "restored" event.
|
||||
*/
|
||||
public function restored(Event $event): void
|
||||
{
|
||||
$this->eventCacheService->clearAllCacheByModel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the Event "force deleted" event.
|
||||
*/
|
||||
public function forceDeleted(Event $event): void
|
||||
{
|
||||
$this->eventCacheService->clearCache($event);
|
||||
$this->eventCacheService->clearAllCacheByModel();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
namespace App\Observers;
|
||||
|
||||
use App\Models\Faculty;
|
||||
use App\Services\App\Cache\FacultyCacheService;
|
||||
|
||||
class FacultyObserver
|
||||
{
|
||||
private FacultyCacheService $facultyCacheService;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->facultyCacheService = app(FacultyCacheService::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the Faculty "created" event.
|
||||
*/
|
||||
public function created(Faculty $faculty): void
|
||||
{
|
||||
$this->facultyCacheService->clearAllCacheByModel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the Faculty "updated" event.
|
||||
*/
|
||||
public function updated(Faculty $faculty): void
|
||||
{
|
||||
$this->facultyCacheService->clearCache($faculty);
|
||||
$this->facultyCacheService->clearAllCacheByModel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the Faculty "deleted" event.
|
||||
*/
|
||||
public function deleted(Faculty $faculty): void
|
||||
{
|
||||
$this->facultyCacheService->clearCache($faculty);
|
||||
$this->facultyCacheService->clearAllCacheByModel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the Faculty "restored" event.
|
||||
*/
|
||||
public function restored(Faculty $faculty): void
|
||||
{
|
||||
$this->facultyCacheService->clearAllCacheByModel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the Faculty "force deleted" event.
|
||||
*/
|
||||
public function forceDeleted(Faculty $faculty): void
|
||||
{
|
||||
$this->facultyCacheService->clearCache($faculty);
|
||||
$this->facultyCacheService->clearAllCacheByModel();
|
||||
}
|
||||
}
|
||||
@@ -26,7 +26,7 @@ class PageObserver
|
||||
/**
|
||||
* Handle the Page "updated" event.
|
||||
*/
|
||||
public function updated(Page $page)
|
||||
public function updated(Page $page): void
|
||||
{
|
||||
$this->pageCacheService->clearCache($page);
|
||||
}
|
||||
@@ -34,7 +34,7 @@ class PageObserver
|
||||
/**
|
||||
* Handle the Page "deleted" event.
|
||||
*/
|
||||
public function deleted(Page $page)
|
||||
public function deleted(Page $page): void
|
||||
{
|
||||
$this->pageCacheService->clearAllCacheByModel();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
namespace App\Observers;
|
||||
|
||||
use App\Models\PageReferenceList;
|
||||
use App\Services\App\Cache\PageReferenceListCacheService;
|
||||
|
||||
class PageReferenceListObserver
|
||||
{
|
||||
private PageReferenceListCacheService $pageReferenceListCacheService;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->pageReferenceListCacheService = app(PageReferenceListCacheService::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the PageReferenceList "created" event.
|
||||
*/
|
||||
public function created(PageReferenceList $pageReferenceList): void
|
||||
{
|
||||
$this->pageReferenceListCacheService->clearAllCacheByModel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the PageReferenceList "updated" event.
|
||||
*/
|
||||
public function updated(PageReferenceList $pageReferenceList): void
|
||||
{
|
||||
$this->pageReferenceListCacheService->clearCache($pageReferenceList);
|
||||
$this->pageReferenceListCacheService->clearAllCacheByModel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the PageReferenceList "deleted" event.
|
||||
*/
|
||||
public function deleted(PageReferenceList $pageReferenceList): void
|
||||
{
|
||||
$this->pageReferenceListCacheService->clearCache($pageReferenceList);
|
||||
$this->pageReferenceListCacheService->clearAllCacheByModel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the PageReferenceList "restored" event.
|
||||
*/
|
||||
public function restored(PageReferenceList $pageReferenceList): void
|
||||
{
|
||||
$this->pageReferenceListCacheService->clearAllCacheByModel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the PageReferenceList "force deleted" event.
|
||||
*/
|
||||
public function forceDeleted(PageReferenceList $pageReferenceList): void
|
||||
{
|
||||
$this->pageReferenceListCacheService->clearCache($pageReferenceList);
|
||||
$this->pageReferenceListCacheService->clearAllCacheByModel();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
namespace App\Observers;
|
||||
|
||||
use App\Models\Schedule;
|
||||
use App\Services\App\Cache\ScheduleCacheService;
|
||||
|
||||
class ScheduleObserver
|
||||
{
|
||||
private ScheduleCacheService $scheduleCacheService;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->scheduleCacheService = app(ScheduleCacheService::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the Schedule "created" event.
|
||||
*/
|
||||
public function created(Schedule $schedule): void
|
||||
{
|
||||
$this->scheduleCacheService->clearAllCacheByModel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the Schedule "updated" event.
|
||||
*/
|
||||
public function updated(Schedule $schedule): void
|
||||
{
|
||||
$this->scheduleCacheService->clearCache($schedule);
|
||||
$this->scheduleCacheService->clearAllCacheByModel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the Schedule "deleted" event.
|
||||
*/
|
||||
public function deleted(Schedule $schedule): void
|
||||
{
|
||||
$this->scheduleCacheService->clearCache($schedule);
|
||||
$this->scheduleCacheService->clearAllCacheByModel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the Schedule "restored" event.
|
||||
*/
|
||||
public function restored(Schedule $schedule): void
|
||||
{
|
||||
$this->scheduleCacheService->clearAllCacheByModel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the Schedule "force deleted" event.
|
||||
*/
|
||||
public function forceDeleted(Schedule $schedule): void
|
||||
{
|
||||
$this->scheduleCacheService->clearCache($schedule);
|
||||
$this->scheduleCacheService->clearAllCacheByModel();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
<?php
|
||||
|
||||
namespace App\Observers;
|
||||
|
||||
use App\Models\MainSlider;
|
||||
use App\Models\Slide;
|
||||
use App\Services\App\Cache\MainSliderCacheService;
|
||||
use App\Services\App\Cache\SliderCacheService;
|
||||
|
||||
class SlideObserver
|
||||
{
|
||||
protected SliderCacheService $cacheService;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->cacheService = new SliderCacheService();
|
||||
}
|
||||
/**
|
||||
* Handle the MainSlider "created" event.
|
||||
*/
|
||||
public function created(Slide $slide): void
|
||||
{
|
||||
// Устанавливаем сортировку для новой записи
|
||||
$slide->sort = 1;
|
||||
$slide->save();
|
||||
|
||||
// Обновляем сортировку для всех остальных записей
|
||||
$this->updateSortOrder($slide->id, $slide->slider_id);
|
||||
|
||||
$this->cacheService->clearAllCacheByModel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the MainSlider "updated" event.
|
||||
*/
|
||||
public function updated(Slide $slide): void
|
||||
{
|
||||
$this->cacheService->clearAllCacheByModel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the MainSlider "deleted" event.
|
||||
*/
|
||||
public function deleted(Slide $slide): void
|
||||
{
|
||||
$this->cacheService->clearAllCacheByModel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the MainSlider "restored" event.
|
||||
*/
|
||||
public function restored(Slide $slide): void
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the MainSlider "force deleted" event.
|
||||
*/
|
||||
public function forceDeleted(Slide $slide): void
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
protected function updateSortOrder($id, $slider_id): void
|
||||
{
|
||||
// Получаем все записи, отсортированные по текущему значению sort
|
||||
$slides = Slide::orderBy('sort', 'asc')->where([['slider_id', $slider_id], ['id', '!=', $id]])->get();
|
||||
|
||||
if ($slides->count() > 0) {
|
||||
foreach ($slides as $index => $slide) {
|
||||
$slide->sort = $index + 2; // Начинаем с 1
|
||||
$slide->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
namespace App\Observers;
|
||||
|
||||
use App\Models\User;
|
||||
use App\Services\App\Cache\UserCacheService;
|
||||
|
||||
class UserObserver
|
||||
{
|
||||
private UserCacheService $userCacheService;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->userCacheService = app(UserCacheService::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the User "created" event.
|
||||
*/
|
||||
public function created(User $user): void
|
||||
{
|
||||
$this->userCacheService->clearAllCacheByModel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the User "updated" event.
|
||||
*/
|
||||
public function updated(User $user): void
|
||||
{
|
||||
$this->userCacheService->clearCache($user);
|
||||
$this->userCacheService->clearAllCacheByModel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the User "deleted" event.
|
||||
*/
|
||||
public function deleted(User $user): void
|
||||
{
|
||||
$this->userCacheService->clearCache($user);
|
||||
$this->userCacheService->clearAllCacheByModel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the User "restored" event.
|
||||
*/
|
||||
public function restored(User $user): void
|
||||
{
|
||||
$this->userCacheService->clearAllCacheByModel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the User "force deleted" event.
|
||||
*/
|
||||
public function forceDeleted(User $user): void
|
||||
{
|
||||
$this->userCacheService->clearCache($user);
|
||||
$this->userCacheService->clearAllCacheByModel();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user