Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Jackrotto's avatar

$request->input() is returning an empty string while $request->get() returns null value.

I am sending JSON data with an empty string. When I retrieve data with get() it gets the value as null, but when I use input() it gets an empty string. I thought get() uses input() as an intermediate, but why they are returning different values. Am I missing something?

0 likes
1 reply

Please or to participate in this conversation.