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