Answer the question
In order to leave comments, you need to log in
How to get the correct parameter in the Repository?
Good evening.
Help solve the problem.
There is an action in the controller in which I need to get three parameters and delete the entry from the database.
In the form template, the route is specified in the action
<form action="{{ url('memorials.detach', {id: memorial.id, user_id: user.user, role: user.role}) }}"
/**
* @Route("/detach/{id}/{user_id}/{role}", name=".detach", methods={"DELETE"})
* @param Request $request
* @param string $user_id
* @param string $role
* @param Detach\Handler $handler
* @return Response
*/
public function detach(Request $request, string $id, string $user_id, string $role, Detach\Handler $handler): Response
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question