Plugin Development (Craft 3): Pass variables with redirection I'm building out a Craft 3 plugin and can't see who to pass variables with redirection from a controller. 

For example, I have a controller that I want to pass back to the defined redirect value along with a variable, eg:

return $this-&gt;redirectToPostedUrl( ['order' =&gt; $order ] );

However, trying to access the order variable within my template is returning empty. The order object definitely exists before the redirection as it can be accessed from within my controller.

Any suggestions appreciated - I'm sure am overlooking something quite straightforward!
Try this:
Craft::$app-&gt;getUrlManager()-&gt;setRouteParams([
               'variables' =&gt; ['order' =&gt; $order]
             ]);