Laravel 5.1 working with session to track current online uses

765 Views Asked by At

I am trying to get the current online users in Laravel but I am getting this error everywhere

"RuntimeException in compiled.php line 2591: Session store not set on request"

I was following this example "http://laravel.io/forum/03-03-2014-sentry-3-users-online" I did set every correct as I confirm through out here is the snippet of where the error is coming from:

public function session()
{
    if (!$this->hasSession()) {
        throw new RuntimeException('Session store not set on request.');
    }
    return $this->getSession();
}

Thanks

1

There are 1 best solutions below

0
alvariux On

You can try use the Session class

Session::set and Session::get