What is the difference between $this->render and $this->redirect. Is there a way i can pass arguments with $this->render like in I do 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 any other way I can pass values with $this->redirect to my template twig file.
And One more question How can i change the url with $this->redirect
, eg If i dont have to pass any values to my template file I can do as mentioned above the render will take me to a page like localhost/myproject/home but $->this->redirect
will execute the controller but the url wil be the same like localhost/myproject/. Is there anyway i can redirect to another url using redirect