Only arrays and Traversables can be unpacked

My code is like this:

use Filament\Notifications\Actions\Action;
use Filament\Notifications\Notification;

public function delete(): void
    {
        Notification::make()
            ->warning()
            ->title('Delete confirmation')
            ->body('Are you sure you want to delete this reply?')
            ->actions([
                Action::make('confirm')
                    ->label('Confirm')
                    ->color('danger')
                    ->button()
                    ->close()
                    ->dispatch('doDelete', [$this->reply->id]),

                Action::make('cancel')
                    ->label('Cancel')
                    ->close()
            ])
            ->persistent()
            ->send();
    }

public function doDelete(int $reply): void
    {
        dd($reply);
    }


After I click on confirm, it gives me the following error: Only arrays and Traversables can be unpacked

Where am I wrong?
Thank you
Was this page helpful?