Set MorphToSelect to a value in mount()

What on earth is a good way to pre-set the Morph-type to a default value when using a form?
2 Replies
The Milkman
The MilkmanOPβ€’2y ago
Oh haha, the moment I posted this, I found a solution πŸ˜‰
$this->form->fill([
'recipient_type' => User::class,
]);
$this->form->fill([
'recipient_type' => User::class,
]);
Or, if you are using Morphmaps, use something like this:
'recipient_type' => User::make()->getMorphClass()
'recipient_type' => User::make()->getMorphClass()
OnlyTieBowline
OnlyTieBowlineβ€’14mo ago
@The Milkman I am trying to solve the same problem. Where exactly did you place the $this->form->fill() ?
Want results from more Discord servers?
Add your server