简体   繁体   English

找不到“哨兵”类(Laravel 4)

[英]Class 'Sentinel' not found (Laravel 4)

I'm using Laravel 4 and rydurham/Sentinel ( https://cartalyst.com/manual/sentinel ). 我正在使用Laravel 4和rydurham / Sentinel( https://cartalyst.com/manual/sentinel )。 I'm able to log in users, register users and display the Sentinel views I've customized perfectly fine. 我可以登录用户,注册用户并显示我自定义的Sentinel视图。 The config changes I've made register fine. 我进行的配置更改使注册正常。 However, when I include: 但是,当我包括:

{{ Sentinel::check() }}

or 要么

{{ Sentinel::guest() }}

I get the error Class 'Sentinel' not found . 我收到Class 'Sentinel' not found的错误。 I notice there is no Sentinel Facade in $aliases , and running composer dump-autoload does not fix this. 我注意到$aliases没有Sentinel Facade,并且运行composer dump-autoload不能解决此问题。 Any thoughts? 有什么想法吗?

The problem was that I'm using rydurham/Sentinel and not Cartalyst's Sentinel package. 问题是我使用的是rydurham/Sentinel而不是Cartalyst的Sentinel软件包。 They are two different things. 他们是两个不同的东西。 rydurham/Sentinel includes the facades for Sentry though, so you can use: rydurham/Sentinel包括外立面Sentry ,因此你可以使用:

{{ Sentry::check() }}
{{ Sentry::guest() }}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM