mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 12:30:49 +08:00
add searchbox select unselect
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Filament\Resources\Section\SecondIconResource\Pages;
|
||||
|
||||
use App\Filament\RedirectIndexTrait;
|
||||
use App\Filament\Resources\Section\SecondIconResource;
|
||||
use App\Models\SearchBox;
|
||||
use App\Models\SecondIcon;
|
||||
@@ -10,6 +11,8 @@ use Filament\Resources\Pages\EditRecord;
|
||||
|
||||
class EditSecondIcon extends EditRecord
|
||||
{
|
||||
use RedirectIndexTrait;
|
||||
|
||||
protected static string $resource = SecondIconResource::class;
|
||||
|
||||
protected function getActions(): array
|
||||
@@ -27,7 +30,7 @@ class EditSecondIcon extends EditRecord
|
||||
protected function mutateFormDataBeforeFill(array $data): array
|
||||
{
|
||||
$mode = $data['mode'];
|
||||
foreach (SearchBox::$taxonomies as $torrentField => $table) {
|
||||
foreach (SearchBox::$taxonomies as $torrentField => $taxonomyTableModel) {
|
||||
$taxonomyValue = $data[$torrentField] ?? null;
|
||||
unset($data[$torrentField]);
|
||||
$data[$torrentField][$mode] = $taxonomyValue;
|
||||
|
||||
Reference in New Issue
Block a user