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(); } <
public function add_question() { return Request::all(); }
You should use the facade rather than Illuminate\Http\Request. Import it at the top:
Illuminate\Http\Request
use Request;
And make sure it doesn't conflict with the other class.
Edit: This answer was written a few years ago. I now favour the approach suggested by shuvrow below.