example.com/route-name?var1=value1
Route::get('route-name', 'Namespace\ControllerClass@functionName')->name('route-name');
public function functionName(Request $request) {
$validator = Validator::make($request->all(), [
'email' => 'required|string|email|max:191',
'password' => 'required|string|min:6',
'var1' => 'requred|strring'
]);
if ($validator->fails()) {
return $this->respondBadRequest('Validation failed for parameters please review.', $validator->errors()->toArray());
}
}