src/Http/Middleware/CreateFreshApiToken.php
protected function alreadyContainsToken($response)
    {
        foreach ($response->headers->getCookies() as $cookie) {
            if ($cookie->getName() === Passport::cookie()) {
                return true;
            }
        }

        return false;
    }
protected function alreadyContainsToken($response)
    {
        foreach ($response->headers->getCookies() as $cookie) {
            if ($cookie->getName() === Passport::cookie()) {
                return true;
            }
        }

        return false;
    }
protected function alreadyContainsToken ( $ response ) { foreach ( $ response -> headers -> getCookies ( ) as $ cookie ) { if ( $ cookie -> getName ( ) === Passport :: cookie ( ) ) { return true ; } } return false ; }
Determine if the given response already contains an API token.

This avoids us overwriting a just "refreshed" token.

@param  \Illuminate\Http\Response  $response
@return bool
Determine if the given response already contains an API token .