You can check not only one parameter with $request->has()
method, but also check for multiple parameters present, with $request->hasAny()
:
1public function store(Request $request)2{3 if ($request->hasAny(['api_key', 'token'])) {4 echo 'We have API key passed';5 } else {6 echo 'No authorization parameter';7 }8}