我怎样才能在Lumen上设置一个哨兵呢?一开始,我有
找不到“哨兵”类
然后我注册了哨兵并创建了一个别名如下:
$app->register(Cartalyst\Sentinel\Laravel\SentinelServiceProvider::class);
class_alias(Cartalyst\Sentinel\Laravel\Facades\Sentinel::class, 'Sentinel');但我有
类session.store不存在
然后我也注册了这样的会话:
$app->register(Illuminate\Session\SessionServiceProvider::class);
class_alias(Illuminate\Support\Facades\Session::class, 'Session');然后我得到了:
缺少用于照明\Support\Manager::createDriver()的参数1,在第88行的/Applications/MAMP/htdocs/projects/gexd/zeno-new/mobile/vendor/illuminate/support/Manager.php中调用并定义。
发布于 2018-01-19 17:21:23
运行composer require cartalyst/sentinel "2.0.*"后,在config/app.php中注册它。
在供应商中使用:
Cartalyst\Sentinel\Laravel\SentinelServiceProvider::class,
在别名部分中使用:'Activation' => Cartalyst\Sentinel\Laravel\Facades\Activation::class, 'Reminder' => Cartalyst\Sentinel\Laravel\Facades\Reminder::class, 'Sentinel' => Cartalyst\Sentinel\Laravel\Facades\Sentinel::class,
您可以看到更多的哨兵。如果覆盖了这些步骤。然后,您可能忘记在控制器顶部使用use Sentinel;。
https://stackoverflow.com/questions/48344972
复制相似问题