Can I use relationships in a form like this?
I have a table that successfully uses a relationship from another table:
Tables\Columns\TextColumn::make('company.company_name'),
This displays the company name due to the relation setup in the model.
But when I try and replicate this for the form, it doesn't work:
Forms\Components\Select::make('company.company_name')
->required()
How do I get the select drop down to show the company names? (and write the ID back to the database when editing the records)?
Tables\Columns\TextColumn::make('company.company_name'),
This displays the company name due to the relation setup in the model.
But when I try and replicate this for the form, it doesn't work:
Forms\Components\Select::make('company.company_name')
->required()
How do I get the select drop down to show the company names? (and write the ID back to the database when editing the records)?