Laravel Auth: check if user is a guest

Code
<?php

use Illuminate\Auth\SessionGuard;
use 
Illuminate\Cookie\CookieJar;
use 
Illuminate\Session\Store;
use 
Illuminate\Session\CookieSessionHandler;
use 
Illuminate\Auth\EloquentUserProvider;
use 
Illuminate\Hashing\BcryptHasher;
use 
Illuminate\Database\Eloquent\Model;
use 
Illuminate\Http\Request;

class 
Foo extends Model
{}

$cookieJar = new CookieJar();
$sessionHandler = new CookieSessionHandler($cookieJar15);
$sessionStore = new Store('myname'$sessionHandler);
$hasher = new BcryptHasher();
$userProvider = new EloquentUserProvider($hasher'Foo');
$request Request::createFromGlobals();

$guard = new SessionGuard('myname'$userProvider$sessionStore$request);

if (
$guard->guest()) {
    echo 
'Hello guest, you need to log in.';
}
Result
Hello guest, you need to log in.
Used Versions
PHP 7.1, Zend 3.0, Symfony 3.2, Laravel 5.2, PHPUnit 5.6, Doctrine 2.6