Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
How to Kepp Pretty URI's When Underscore is Used as Directory Separator?
  • Hey! I just tried to create users system with pages: sign up, sign in etc.. I want that users can access pages using URI's like... * /sign_up,
    * /sign_in; The problem is that I can't name controller like "Controller_Sign_In"... ( It would mean that it's location is in ".../controller/sign/in.php", but actually it isn't. It's ".../controller/sign_in.php". How to deal with this problem? I don't want to use routes for this funny task.( Any ideas?
  • You could use signin and signup or signIn and signUp. I would use in this particular example the first method but if the function names got larger I would use the second method.
  • Yes, but the link anyway would be "/signin" and that's not pretty. (
  • Just add a route for them.
  • Okey, boss... (
  • oh I think i just found the answer to my previous posted question. if you create a route, it overrides any autoloading based on folder filename
    i.e. create route
    'about-our-company' => '/company/about',
    /* it calls the controller named "Controller_company"
    and the method named "Action_about" */ and we could use SEO friendly uri's like user/account-login user/account-logout becasue the routing would determine which controller / action handles it. nice! I guess I need to read the f'in manual
    http://fuelphp.com/docs/general/coding_standards.html

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion