Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
HMVC Request Uri string problem
  • Hi,

    Site Index function
    {
         $view_data = array();
         $view_data['header'] = Request::forge('module/header/index')->execute(); // header

        return Response::forge(View::forge('site/site_view', $view_data));
    }

    Header HMVC controller view in Uri::string(); // output module/header/index
    Current address problem?
    Current addres is : http://localhost/tr/site/index
  • HarroHarro
    Accepted Answer
    This is correct.

    The Uri class (to be exact the static methods "string", "segment" and "segments") is "context-aware", which means it returns information about the current request.

    If you want information about the main request (or any other pending request), you can access that via the request object. For the main request, use:

    string() => \Request::main()->uri->get();
    segment() => \Request::main()->uri->get_segment();
    segments() => \Request::main()->uri->get_segments();
  • Thank you...
    Problem resolved...

Howdy, Stranger!

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

In this Discussion