简体   繁体   中英

Class 'Sentinel' not found (Laravel 4)

I'm using Laravel 4 and 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. 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 . I notice there is no Sentinel Facade in $aliases , and running composer dump-autoload does not fix this. Any thoughts?

The problem was that I'm using rydurham/Sentinel and not Cartalyst's Sentinel package. They are two different things. rydurham/Sentinel includes the facades for Sentry though, so you can use:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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