What is meant by Retrieving Input ?
Answer / amit khanna
The input values can be easily retrieved in Laravel.
No matter what method was used “get” or “post”, the Laravel method will retrieve input values for both the methods the same way.
There are two ways we can retrieve the input values.
Using the input() method
Using the properties of Request instance
Using the input() method
The input() method takes one argument, the name of the field in form. For example, if the form contains username field then we can access it by the following way.
$name = $request->input('username');
Using the properties of Request instance
Like the input() method, we can get the username property directly from the request instance.
$request->username
| Is This Answer Correct ? | 0 Yes | 0 No |
What is seed in laravel?
What is a Laravel - Ajax ?
What are the requirements for laravel 5.8?
What are the three types of authentication?
List default packages of laravel 5.6?
Where do you locate database configuration file?
How to create Facade in Laravel ?
How to create custom middleware in laravel?
What is meant by Implicit Controllers
Explain the concept of encryption and decryption in laravel.
How many types of middleware are there in laravel?
Why do we need dependency injection?