What is the use of these steps in a PHP code. In my code I use to create a login page where username and passwords are inputs but I did not understand why the following step is used.
$input = Input::all();
What is the use of these steps in a PHP code. In my code I use to create a login page where username and passwords are inputs but I did not understand why the following step is used.
$input = Input::all();
Input::all()
gets all the fields from your form upon submit. So, your $input
variable will have array of fields from the form. eg: ['name'=>'John', 'email'=>'john@doe.com']
Inut::all()
is no longer used. Instead, you can use $request->all()
or Request::all()