문제

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.

도움이 되었습니까?

해결책

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
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top