back in the (real) days, we used to use $_GET
, $_POST
! and now we got Laravel's \Request::input()
. Consequently here is whats happening:
if(\Request::isMethod('post'))
{
$POST = \Request::input();
}
if I have the a variable in $_GET, the value gets in the POST as well.
For example:
&x=1
//i.e. in the query string
$_POST['x'] = null;
//as it was not posted with the form, but it could be as there is a field with same name
$POST['x'] = 1;
//as its in the GET, but should be null as its not in the $_POST!
Any solution to get POSTed vars only? Or shall I just use $_POST?
Thanks