F
Filament3w ago
Majd

Set default MorphTo relationships in Form Builder

How for MorphTo relationships in Form Builder add default value on first step when choose MorphToSelect\Type? I need when I press button "New record" and open create page '/admin/comments/create', already default value choose on first step (see image 1) I need something like this: MorphToSelect::make('commentable') ->types([ MorphToSelect\Type::make(Product::class) ->titleAttribute('name'), MorphToSelect\Type::make(Post::class) ->titleAttribute('title'), ]) ->default(Product::class)
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server