No route found in Shopware6/symfony

tklustig

Erfahrenes Mitglied
Hallo Leute, folgender Code führt immer zu dem Error:
No route found for "GET https://tklustig.de/share/trade/action/" (from "https://tklustig.de/share/trade/download/")
Wie mache ich es richtig?
Controller:
#[NoReturn] #[Route(path: '/share/trade/action/{id}', name: 'frontend.action', methods: ['GET'])] public function downloading($id): void { dd($id); }
Aufruf:
$content .= '<a href="/share/trade/action/?id=5 "> Download </a>';

Wenn ich die Route so formuliere;
#[NoReturn] #[Route(path: '/share/trade/action/', name: 'frontend.action', methods: ['GET'])]
bekomme ich die Fehlermeldung:
Could 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 werden nicht angenommen. Ohne Parameter in der Route und im Link klappt der Aufruf, ich benötige die Parameter aber und will POST nicht nutzen

Für alle Antworten vorab vielen Dank
 
Zuletzt bearbeitet:

Neue Beiträge

Zurück