Show relationship in textbox
Hi, so I'm using laravel as my backend.
In my front end people can fill out a contactform and either include a car or just a general contactform.
In the database the id of the car gets saved.
But I would like to be able to show the brand name + model of the car in the form and make it clickable so it goes to the car the form was filled in about.
In my cars table the brand is an id which has a relationship to a brand table
How would I best go about this?
8 Replies
where should they click? inside a form?
Yes, wait I'm getting some more info to make things clearer:
this is a message seeder:
In here the Car select box I want to change to a textbox with as value the brand name + car model
And since there can be multiple same cars (used car dealership) It would be very useful to be able to click on the car and be sent to my car page
Which should just be /admin/cars/id
This is my messageResource
you can use markdown in the helperText() of a field
pass a function, get the $state of the field, and use markdown to write a link
Thank you
How could i go about passing the brand name and car model in the field?
Car::find($state)
Thank you a lot
You guys rock