mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-03 14:10:57 +08:00
32 lines
685 B
PHP
32 lines
685 B
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\System\SectionResource\Pages;
|
|
|
|
use App\Filament\Resources\Section\SectionResource;
|
|
use App\Models\SearchBox;
|
|
use Filament\Pages\Actions;
|
|
use Filament\Resources\Pages\EditRecord;
|
|
|
|
class EditSection extends EditRecord
|
|
{
|
|
protected static string $resource = SectionResource::class;
|
|
|
|
protected function getActions(): array
|
|
{
|
|
return [
|
|
Actions\DeleteAction::make(),
|
|
];
|
|
}
|
|
|
|
protected function mutateFormDataBeforeSave(array $data): array
|
|
{
|
|
return SearchBox::formatTaxonomyExtra($data);
|
|
}
|
|
|
|
protected function afterSave()
|
|
{
|
|
clear_search_box_cache($this->record->id);
|
|
}
|
|
|
|
}
|