Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Named param and routing
  • Hello, I have a problem whit a named params.
    config/routes.php
    return array(
    '_root_'  => 'dashboard/index',  // The default route
    '_404_'   => 'dashboard/404',    // The main 404 route

        'dashboard/wait/:name/:id' => array('dashboard/wait'),
    );

    action in controller
    public function action_wait()
    {
        var_dump($this->param('name')); //NULL
        var_dump($this->param('id')); //NULL
    }

    Request is /dashboard/wait/start/1
    Why?
  • Sorry, I'm stupid =)
    Wrong routes config! Must be  'dashboard/wait/:name/:id' => 'dashboard/wait',

Howdy, Stranger!

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

In this Discussion