->mutateRelationshipDataBeforeCreateUsing(function (array $data, $livewire): array { $data['parent_id'] = $livewire->record->id; return $data; })
use Filament\Forms\Components\Livewire; ->mutateRelationshipDataBeforeCreateUsing(function (array $data, Livewire $livewire): array { dd($livewire); return $data; })