add order

This commit is contained in:
lubiana 2024-06-14 17:41:00 +02:00
parent 7663f684a4
commit 1dc5306967
No known key found for this signature in database
37 changed files with 1060 additions and 113 deletions

View file

@ -67,15 +67,4 @@ final class FoodVendorController extends AbstractController
'form' => $form,
]);
}
#[Route('/{id}', name: 'app_food_vendor_delete', methods: ['POST'])]
public function delete(Request $request, FoodVendor $foodVendor, EntityManagerInterface $entityManager): Response
{
if ($this->isCsrfTokenValid('delete' . $foodVendor->getId(), $request->getPayload()->getString('_token'))) {
$entityManager->remove($foodVendor);
$entityManager->flush();
}
return $this->redirectToRoute('app_food_vendor_index', [], Response::HTTP_SEE_OTHER);
}
}