Add a new function to add to request methods (POST, GET etc) |
Hi,
I'm not sure if the functionality for this already exists as I haven't been able to find any documentation for this in the CI docs. Basically we should be able to add to a GET or POST request vars manually using a method like PHP Code: $this->request->setPost('key' => 'value'); Currently if you need to add something to a request inside a controller, then you set it like so PHP Code: $_POST['key'] = 'value'; PHP Code: $this-request->getPost();
It's not super clear in the doc, but what you're looking for is setGlobal:
PHP Code: $this->request->setGlobal('post', [
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
> Basically we should be able to add to a GET or POST request vars manually
Why do you need such a functionality? |
Welcome Guest, Not a member yet? Register Sign In |