How do you append a parameter to an URL in a controller action?

Can you do modify an url from the controller and modify the current URL? For instance, in the method actionCreate of MainController.php.


I want to add ‘&lock=3841’ to the url, which gives:


Are you looking for redirect?