Abrar Jahin Abrar Jahin - 6 months ago 48
PHP Question

how to get All input of POST in Laravel 5

I am using Laravel 5 and trying to get all input of POST variable in controller like this-

public function add_question()
return Request::all();

So, I am getting this errors-

enter image description here

What I am doing wrong?

Answer Source

You should use the facade rather than Illuminate\Http\Request. Import it at the top:

use Request;

And make sure it doesn't conflict with the other class.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download