Accessing raw parameter values

Last updated on
6 January 2023

This documentation needs work. See "Help improve this page" in the sidebar.

If you need to access the unconverted data, like for example a user ID, you can access the data using $request->attributes->get('_raw_variables')->get('user') or better $route_match->getRawParameter('user'), which has the values before the param conversion.

Similar to the $request object you can get the route match object by having a $route_match parameter on your controller method. In other contexts use the 'current_route_match' service.

Help improve this page

Page status: Needs work

You can: