orders as $order) { $data['orders'][] = $order->id; } return $data; } protected function handleRecordUpdate(Model $record, array $data): Model { $record->orders()->delete(); $record->orders()->saveMany(Order::findMany($data['orders'])); return $record; } protected function getHeaderActions(): array { return [ Actions\DeleteAction::make(), ]; } }