Bonjour,
Je souhaite rajouter des paramètre de type GET dans une redirection.
Dans mon controller je fais ma redirection de cette manière :
Voici la config de ma route :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6 $options = array('action' => 'edit', 'id' => $pageId); if(!empty($lang)) { $options['lang'] = $lang; } return $this->redirect()->toRoute('backoffice', $options);
mais l'option 'lang' n'est jamais passé à ma redirection.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 backoffice' => array( 'type' => 'segment', 'options' => array( 'route' => '/backoffice[/:action][/:id]', 'constraints' => array( 'action' => '[a-zA-Z][a-zA-Z0-9_-]+', 'id' => '[0-9]+', ), 'defaults' => array( 'controller' => 'BackOffice', 'action' => 'index', ), ), 'may_terminate' => true, 'child_routes' => array( 'query'=>array("type"=>"query") )
La drenière partie de ma config a été rajouter dans le but d'autoriser des paramètre get sans grand succès :
Si vous aviez une solution, merci.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4 'may_terminate' => true, 'child_routes' => array( 'query'=>array("type"=>"query") )
Partager