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-
What I am doing wrong?
The “path” method is used to retrieve the requested URI. The is method is used to retrieve the requested URI which matches the particular pattern specified in the argument of the method. To get the full URL, we can use the url method.
Laravel's Illuminate\Http\Request class provides an object-oriented way to interact with the current HTTP request being handled by your application as well as retrieve the input, cookies, and files that were submitted with the request.
Try this :
use Illuminate\Support\Facades\Request; public function add_question(Request $request) { return $request->all(); }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With