MartinW12
5 months ago
1327
6
Laravel

How to get POST only data in Laravel 6

Posted 5 months ago by MartinW12

Hello,

I am using Laravel 6.

If I do a $request->post('foo') it returns the value of "foo" in the query string.

Similarly, if I do a $request->has('foo') it returns TRUE if "foo" is set in the query string.

However I want it to ONLY look at POST data, and to ignore the query string in both cases.

How can I make it do this?

Thanks,

Martin

Please sign in or create an account to participate in this conversation.