model view controller - call action with parametr from route -
i have following action in zf2 controller
public function indexaction($text1,$text2) { }
is there way call indexaction $text1 & $text2 params route
for example :
localhost/project/index/text1/sadasd/text2/asdasd
take @ zend\mvc\controller\plugin\params
.
example code be:
$t1 = $this->params()->fromroute('text1'); $t2 = $this->params()->fromroute('text1'); // edit, fromroute() default, can $t1 = $this->params('text1', $defaultvalue);
adding them parameters indexaction()
won't anything.
Comments
Post a Comment