forked from lubiana/futtern
add order
This commit is contained in:
parent
7663f684a4
commit
1dc5306967
37 changed files with 1060 additions and 113 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue