Welcome Guest, Not a member yet? Register   Sign In
Help with controllers, not routing correctly

Hi, I'm working on a tourism website, so there are lots of hotels, guest houses, etc. So I wanted to make a unique controller for each type. I created a controller, guest-houses.php, and named the class Guest-House. For some reason the router doesn't route it to that controller, is there some way to use a '-' in the class and route name and let it work properly?

This is my current route that I tried to use for that page:
$route['guest-houses/(:any)'] = "guest-houses/display/$1";

But it doesn't route to the guest-houses.php controller as I wanted it to.

Any ideas?

Sorry, after reading my own post I felt like an idiot... I just renamed the controller to guest_houses.php and the class to Guest_Houses and in the routes I changed the route to:
$route['guest-houses/(:any)'] = "guest_houses/display/$1";

Theme © iAndrew 2016 - Forum software by © MyBB