【发布时间】:2014-06-12 21:51:20
【问题描述】:
带有 ACL 的 Sentry 2 的 Laravel 4 注意:我使用 laravel 函数登录,但只需要哨兵用于 ACL 目的,检查权限
想要实现这个:
if ( Sentry::getUser()->hasAnyAccess(['system']) )
{
echo 'has access to system';
}
但我不断收到以下错误:
Sentry::getUser()->hasAnyAccess(['system']); //this hits error: Call to a member function hasAnyAccess() on a non-object
【问题讨论】:
标签: php laravel-4 cartalyst-sentry