Passing arguments to redirect_to in mojolicious and using them in the target controller

后端 未结 2 1827
自闭症患者
自闭症患者 2020-12-19 07:03

I am passing arguments to redirect_to like

$c->redirect_to(\'named\', foo => \'bar\');

or

$c->redirect_to(\'named,         


        
2条回答
  •  有刺的猬
    2020-12-19 07:33

    Very verbose explanation how to pass and get param

    $self is a mojolicious controller. In each case, we call $obj->param for a list of names, $obj->param("arg") for the value (or list of values):

    $self->param             -- params from route, post and get
    $self->req->param        -- params from post and get
    $self->req->query_params -- params from get
    $self->req->body_params  -- params from post
    

提交回复
热议问题