SHARE
TWEET

Untitled

a guest Jun 19th, 2019 48 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. No route found for "POST /agent/": Method Not Allowed (Allow: GET)
  2.      
  3. {% for parking in user.parkings %}
  4.  
  5.          <table id="file_export" class="table table-striped table-bordered">
  6.                 <tbody>
  7.             {% for car in car %}
  8.                 <tr>
  9.                 <td>
  10.                {{ car.matricule }}
  11.                 </td>
  12.                 <td>
  13.               <span class="timer" data-expires="{{ car.getExpiresAt() }}">
  14.               </span>
  15.  
  16.                 </td>
  17.              <td>
  18.  
  19. <button type="button" class="btn btn-dark" href="{{ path('new_amende', {'id': car.id},{'number': car.number}) }}" data-toggle="modal" data-target="#createmodel" data-whatever="{{ car.id }}">
  20. ticket                                
  21. </button>
  22.             {{render(controller('App\Controller\AgentController:newAmende')) }}
  23.  
  24.                 </td>
  25.                 </tr>
  26.              {% endfor %}
  27.      
  28. /**
  29.      * @Route("/{id}/new", name="new_ticket", methods={"GET","POST"})
  30.      */
  31.     public function newTicket(Request $request, Car $car): Response
  32.     {
  33.         $ticket = new Ticket();
  34.         $form = $this->createForm(TicketType::class, $ticket);
  35.         $form->handleRequest($request);
  36.  
  37.         if ($form->isSubmitted() && $form->isValid()) {
  38.             $this->addFlash('success','ticket added !');
  39.  
  40.             $entityManager = $this->getDoctrine()->getManager();
  41.             $entityManager->persist($ticket);
  42.             $entityManager->flush();
  43.  
  44.             return $this->redirectToRoute('agent');
  45.  
  46.  
  47.          }
  48.  
  49.         return $this->render('Agent/modal.html.twig', [
  50.             'ticket' => $ticket,
  51.             'form' => $form->createView(),
  52.         ]);
  53.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top