Hi all,
Have been looking at some PHP frameworks, and chose Yii as the one I want to learn. I am using version 1.1.14
What I want to do is the following:
I have a database table that stores an inventory of about 300 different cars.
To view the entire inventory, you would go to [color="#000080"]mysite.com/inventory[/color]
From there, you would choose a vehicle to view more detailed information about the selected vehicle.
When you select a vehicle, you get redirected to [color="#000080"]mysite.com/inventory/1[/color]
What I want to do is change the "1" at the end of the above URL (which of course is the ID of the vehicle selected) to something like this instead: [color="#000080"]mysite.com/inventory/corvette[/color]
After searching, I’ve found that I would need to go to config/main.php and edit the urlManager rules. But that is where I am stuck. I am not sure how to change the url so that it displays the name of the car instead of the id of the car at the end of the URL.
Any help would be greatly appreciated!