ComputerMaverick's avatar

Dynamic Relationship in Laravel

I want to know if there's a possibility of creating dynamic relationships between form fields stored in a database such that, for example, if I create a dropdown field called "cars" and save to the database, i can also create another form field called "model" that's dependent on the brand of car.

0 likes
2 replies
tykus's avatar

Can you describe the problem you actually are trying to solve, rather than your desired solution?

ComputerMaverick's avatar

@tykus First of all, I have inherited this code and it has no documentation or anything. Now, I'm trying to create a dynamic form whereby the form fields are custom and not hard-coded and vary by different categories depending on the user's preference. How do I create a relationship such that irrespective of the category the user creates on the backend, they can like a parent-child relationship similar to what I described in my original question.

Please or to participate in this conversation.