Answer Posted / 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 |
Post New Answer View All Answers
Explain facades in laravel?
How to use update query in laravel?
How to register a service provider via composer in laravel?
How to configure route cache in laravel?
Do you know laravel eloquent?
Explain contextual binding and how does it work?
Explain me what directories that need to be writable laravel installation?
Explain dependency injection and their types.
Does laravel support caching?
What is difference between var_dump and print_r?
How to pass custom table name in model?
What is url helper?
What is the make method?
What is a laravel model?
What is use of laravel?