I am having some difficulties rerouting to a dynamic URL from within my controller.
in routes.ini
GET /admin/profiles/patient/@patientId/insert-report = Admin->createReport
in the controller Admin.php, in method createReport():
$patientId = $f3->get('PARAMS.patientId');
My attempt (in Admin.php):
$f3->reroute('admin/profiles/patient/' . echo (string)$patientId . '/insert-report');
Question: How to reroute to the same URL (where some error messages will be displayed) without changing completely the routing, that is attaching patientId as a URL query parameter ?
Thanks, K.