Skip to content
Advertisement

Tag: input

Laravel change input value

In laravel, we can get the input value via Input::get(‘inputname’). I try to change the value by doing this Input::get(‘inputname’) = “new value”;. But then, I get the error message saying Can’t use function return value in write context. Is it possible for us change the input value so that when later calling on Input::get(‘inputname’) will get the new amended

PHP “php://input” vs $_POST

I have been directed to use the method php://input instead of $_POST when interacting with Ajax requests from JQuery. What I do not understand is the benefits of using this vs the global method of $_POST or $_GET. Answer The reason is that php://input returns all the raw data after the HTTP-headers of the request, regardless of the content type.

Advertisement