Welcome Guest, Not a member yet? Register   Sign In
Showing product name instead of product id in the URL.
#1

Hi guys.
i am new to CodeIgniter.
I have a controller named product. and i am passing parameters to product controller index function using routes.
$route['mobiles/(:num)'] = 'Product/index/$1';
so it looks like this ( http://localhost/igniter/mobiles/12 )

But my problem is i want to show the name of the product in the url not the id.
i want this  ( http://localhost/igniter/mobiles/Honor-10) or ( http://localhost/igniter/Honor-10)

Any help will be appreciated.
Thanks
Reply


Messages In This Thread
Showing product name instead of product id in the URL. - by mianaliasjad - 07-02-2018, 10:04 PM



Theme © iAndrew 2016 - Forum software by © MyBB