我只是想让我的头围绕着哨兵......它看起来很棒.
我只是想知道是否有功能来检查用户当前是否已登录?
我尝试过使用以下内容:
if(!Sentry::check()) return Redirect::to('login');
但是如果用户没有登录,我会收到以下错误:
Call to undefined method Illuminate\Cookie\CookieJar::get()
谁能为我解释这个问题?
谢谢.
看起来你使用的是Sentry的错误版本.编辑您的composer.json并使用:
"require": { ... "cartalyst/sentry": "2.1.*", ... },
然后
composer update