src/Concerns/InteractsWithAuthentication.php
/**
     * Log into the application using a given user ID or email.
     *
     * @param  object|string  $userId
     * @return $this
     */
Log into the application using a given user ID or email.
@param  object|string  $userId
@return $this
Log into the application using a given user ID or email . @param object|string $userId @return $this
public function loginAs($userId)
    {
        $userId = method_exists($userId, 'getKey') ? $userId->getKey() : $userId;
        return $this->visit('/_dusk/login/'.$userId);
    }
public function loginAs ( $ userId ) { $ userId = method_exists ( $ userId , 'getKey' ) ? $ userId -> getKey ( ) : $ userId ; return $ this -> visit ( '/_dusk/login/' . $ userId ) ; }
Log into the application using a given user ID or email.
Log into the application using a given user ID or email .