When I have nested parameters in an url using route model binding, laravel will automatically populate the pivot on the child model. This even works on belongToMany relationships, with a custom pivot model. Sadly this breaks in livewire when rehydrating the child model.
Does anyone have a clever trick to hydrate the pivot again ?
Back
•
In response to @sinnbeck
This is how I do it currently, but it seems kinda hacky :)
public function hydrateFile()
{
$this->file = $this->customer->resolveChildRouteBinding('file', $this->file->uuid, 'uuid');
}