get previous url symfony 4 in formpage

Solutions on MaxInterview for get previous url symfony 4 in formpage by the best coders in the world

showing results for - "get previous url symfony 4 in formpage"
Elisa
05 Jan 2017
1/* in form */
2<input type="hidden" name="referer" 
3	value="{{app.request.headers.get('referer')}}"/>
4
5/* in controller */
6if ($form->isSubmitted() && $form->isValid()) {
7    $em->persist($thisEntity);
8    $em->flush();
9    return $this->redirect($request->request->get('referer'));
10}