mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-03 14:10:57 +08:00
34 lines
798 B
PHP
34 lines
798 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Filament\Resources\System\SettingResource\Pages;
|
||
|
|
|
||
|
|
use App\Filament\Resources\System\SettingResource;
|
||
|
|
use Filament\Pages\Actions;
|
||
|
|
use Filament\Resources\Pages\EditRecord;
|
||
|
|
|
||
|
|
class EditSetting extends EditRecord
|
||
|
|
{
|
||
|
|
protected static string $resource = SettingResource::class;
|
||
|
|
|
||
|
|
protected function getActions(): array
|
||
|
|
{
|
||
|
|
return [
|
||
|
|
Actions\DeleteAction::make(),
|
||
|
|
];
|
||
|
|
}
|
||
|
|
|
||
|
|
protected function getRedirectUrl(): ?string
|
||
|
|
{
|
||
|
|
return $this->getResource()::getUrl('index');
|
||
|
|
}
|
||
|
|
|
||
|
|
protected function mutateFormDataBeforeSave(array $data): array
|
||
|
|
{
|
||
|
|
$arr = json_decode($data['value'], true);
|
||
|
|
if (is_array($arr)) {
|
||
|
|
throw new \LogicException("Not support edit this !");
|
||
|
|
}
|
||
|
|
return $data;
|
||
|
|
}
|
||
|
|
}
|