Hope you guys can help me, searched long and hard but cannot find my answer.
I am building an API in Lumen, I have a GET route that points to a controller, defined as:
public function mymethod(Request $request, $param1, $param2, $param3)
With POST/PUT routes, I use the included validator as such:
$validator = app('validator')->make($request->all(), $rules, $messages, $customAttributes );
In the GET route outlined above, dd( $request->all() ) returns an empty array (as expected I guess), is there any way to get an array of all the route parameters that have been passed to the method so that I can validate them without writing ugly and specific validation rules?
I could do it manually like:
$parameters = [ 'param1' => $param1, 'param2' => $param2, ... ]
but I was wondering if there was a Laravel way, looks like the Input::all() method might do what I need, but I would prefer to avoid using facades.
Thank you for any help!