Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

chubbard216's avatar

Binding multiple models to a single form (laravelcollective/html)

I'm using the laravelcollective/html package to build an edit form for my sites model. Works great, no complaints.

However one of the fields in my sites model is 'parent_site', which is related to a separate table. Sites often need to be moved around to different parents, so instead of giving the user just a plain old input field with the parent_site id, I was hoping to somehow bind the parents table to the form so I could present the user with a select field, which would contain all the parent names.

Any idea how I might go about tackling this?

0 likes
2 replies
chubbard216's avatar

Thank you much Prez - worked like a charm.

You wouldn't happen to know how I might get the select form to have the correct option:selected would you?

goatshark's avatar

@Prez Your kung fu is strong. I was just stumbling into wondering how this would be done. Thanks.

Please or to participate in this conversation.