Tables\Actions\Action::make('manageCollections')
->label('Manage collections')
->icon('heroicon-o-rectangle-stack')
->modalIcon('heroicon-o-rectangle-stack')
->modalWidth(MaxWidth::Small)
->fillForm(fn (Account $account) => $account->collections()->mine()->get()->all())
->form([
Forms\Components\Select::make('collections')
->label('Collections')
->multiple()
->relationship(
'collections',
'name',
fn (Builder $query) => $query->mine())->preload(),
])
->after(
fn () => Notification::make()
->success()
->title('Saved successfully')
->body('Changes to the account have been saved.')
->send()
),
Tables\Actions\Action::make('manageCollections')
->label('Manage collections')
->icon('heroicon-o-rectangle-stack')
->modalIcon('heroicon-o-rectangle-stack')
->modalWidth(MaxWidth::Small)
->fillForm(fn (Account $account) => $account->collections()->mine()->get()->all())
->form([
Forms\Components\Select::make('collections')
->label('Collections')
->multiple()
->relationship(
'collections',
'name',
fn (Builder $query) => $query->mine())->preload(),
])
->after(
fn () => Notification::make()
->success()
->title('Saved successfully')
->body('Changes to the account have been saved.')
->send()
),