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
How to get data between two dates with query in laravel?
I just installed laravel and have the evil whoops error,how do I find out what’s wrong and fix it?
What do you understand by eloquent orm?
How to create Creating a Controller ?
Does laravel support php 7?
How to localize resource uris in laravel?
What is route in laravel?
How can we check the laravel current version?
Do you know what is laravel framework?
What do you know about service providers in laravel?
How can you make real time sitemap.xml file in laravel?
What is http / console kernels in laravel?
Explain how to resolve class instance out of the container in laravel?
What is database migration used in laravel 5? Explain
What is database migration. How to create migration via artisan?