Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
How to get "root" path using Router::get()?
  • I'm new to FuelPHP and I need help getting the root path of my application using Router::get(). I've used Router::get("root"), Router::get("_root_"), Router::get("default"), as well as just Router::get() but none of them work. How do I do it?
  • HarroHarro
    Accepted Answer
    You can't to that, because there no 'path' attached to the root route.

    The root route is used when there is no URI to route (where there are no URI segments), i.e. when the request URI is equal to Uri::base().
  • Hi Harro,

    Thanks for your reply, I just went ahead and defined a new route for my home page and just started using that. I'm not 100% sure about how to go about using the Router class but it's working for me right now.

Howdy, Stranger!

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

In this Discussion