Currently my URL structure is like this:
www.example.com/honda/ www.example.com/honda/add www.example.com/honda/29343
I have a controller named HondaController.
Now I want to refactor this so I can support more car manufacturers. The database has a table that stores all the manufacturers that I want to support.
How can I keep my URL like above, but now support:
www.example.com/ford www.example.com/toyota/add etc.
I can easily rename the HondaController to CarController, and just pass in the string 'honda' or 'toyota' and my controller will work (it is hard coded to 'honda' right now).
Is this possible? I'm not sure how how to make a route dynamic based on what I have in the database.