You could check if the field names match in your form. Sometimes a misspelled input name is the culprit.
My POST request values returns NULL.
Hi all. I'm trying to POST a value through a REST Application of Chrome. I'm using "Advanced REST Client". The problem is, that I'm posting some values to my link, for example, "example.com/login". And my POST value is like "username:example" and I'm trying to take the POST value from my controller with $request->input('username'); I also tried $request->all() and even $_POST['username']. It returns just null or as invalid index. Yes, I added my link as "/login" to VerifyCSRFToken Middleware except list. Thank you.
Use the Body with JSON like I described earlier rather than Variables (they're for something else).
{
"username": "example_username",
"password": "example_password"
}
Set the Body Content Type to application/json.
Alternatively, set the Body Content Type to application/x-www-form-urlencoded and specify key/value pairs like you were doing with Variables - this will simulate a HTML form being submitted to the specified URL
Please or to participate in this conversation.