What is meant by Retrieving Input ?



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

Post New Answer

More Laravel PHP Framework Interview Questions

Why laravel over other php frameworks?

0 Answers  


Explain how to register a service provider via composer in laravel?

0 Answers  


Tell me how would you add a 3rd party package like sentry?

0 Answers  


Tell us can laravel be hacked?

0 Answers  


Explain auth.

0 Answers  


What is vagrantfile?

0 Answers  


What do you mean by view composers?

0 Answers  


What do you mean by eloquent used in laravel 5?

0 Answers  


How will you check table is exists or in the database?

0 Answers  


What do you call a single quote?

0 Answers  


Why do we use laravel?

0 Answers  


Explain short notes on Laravel - Artisan Console and commands ?

0 Answers  


Categories