Created
October 11, 2020 19:49
-
-
Save NandoKstroNet/911093d8cac72ffbc0091862cba414d2 to your computer and use it in GitHub Desktop.
Trecho método obrigado por sua compra - Curso Symfony 5 Mastery - http://codeexperts.com.br
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//... | |
/** | |
* @Route("/checkout/thanks", name="home_checkout_finished", priority="10") | |
* @IsGranted("ROLE_USER") | |
*/ | |
public function thanks(Request $request) | |
{ | |
$session = $request->getSession(); | |
$cart = $session->get('cart'); | |
if($session->has('cart')) { | |
$session->remove('cart'); | |
} | |
return $this->render('thanks.html.twig', compact('cart')); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment