Question

I've just trying to get my head round sentry... it's looking awesome.

I'm just wondering if there is a function to check if the user is currently logged in?

I've tried using the following:

if(!Sentry::check()) return Redirect::to('login');

But if the user isn't logged in I get the following error:

Call to undefined method Illuminate\Cookie\CookieJar::get()

Can anyone shed any light on this for me?

Thanks.

Was it helpful?

Solution

Looks like you are using a wrong version of Sentry. Edit your composer.json and use:

"require": {
    ...
    "cartalyst/sentry": "2.1.*",
    ...
},

And then

composer update
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top