No route found in Shopware6/symfony

13 views Asked by At

following code will throw out error like this:

No route found for "GET https://tklustig.de/share/trade/action/" (from "https://tklustig.de/share/trade/download/")

What's the right way to intialize link with parameters in order to call php method in symfony?

Controller:

#[NoReturn] #[Route(path: '/share/trade/action/{id}', name: 'frontend.action', methods: ['GET'])]
public function downloading($id): void
{
dd($id);
}

Link:

  $content .= '<a href="/share/trade/action/?id=5 "> Download </a>';

If I define route like this:

#[NoReturn] #[Route(path: '/share/trade/action/', name: 'frontend.action', methods: ['GET'])]

I will get error:

ould not resolve argument $id of "WtManageDownload\Storefront\Controller\DownloadController::downloading()", maybe you forgot to register the controller as a service or missed tagging it with the "controller.service_arguments"?

Parameter will not accepted, but i need it. I don't want to use POST. In advanced thx a lot for each answer!

0

There are 0 answers