Laravel passport allow API access for guest

hello in Laravel I have implemented passport authentication and I need to allow some of my routes for unauthenticated users. I have got this answer from stack overflow and but it shows the following error Declaration of AppHttpMiddlewareAuthenticate::authenticate(array $guards) must be compatible with IlluminateAuthMiddlewareAuthenticate::authenticate($request, array $guards)