I have one controller Leads & there are two function
- Index
- lead-details
Here is my code
class Leads extends CI_Controller {
public function index(){}
public function lead_details($slug){}
Its working like below
www.mysite.com/leads/ This will access to index function
www.mysite.com/leads/lead_details/nice-not-to-have-2
Now i want to get the details like
www.mysite.com/leads/nice-not-to-have-2
I tried this but it confuses with index function
$route['leads/(:any)'] = 'leads/lead_details'
Note: This is not duplicate of this
Issue is with index function. How i can do it with application/config/routes.php?
Example: leads/index give me error as it points to lead_details function