What is the difference between $ this-> render and $ this-> redirect. Is there a way that I can pass arguments using $ this-> render, as is the case with $ this-> redirect
return $this->render('MedicineUserBundle:User:home.html.twig', array( 'info' => $all,));
Can I do something like this: -
return $this->redirect($this->generateUrl('MedicineUserBundle_login', array( 'info' => $all,)));
Or is there another way to pass values ββusing $ this-> redirect to my twig file.
And one more question. How to change the URL using $this->redirect , for example, if I donβt need to pass any values ββto the template file that I can do as described above, the render will lead me to a page, for example localhost / myproject / home , but $->this->redirect will execute the controller, but the url will be the same as localhost / myproject / . Anyway, I can redirect to another url using redirect
php symfony
Scorpion
source share