【发布时间】:2019-12-31 20:40:17
【问题描述】:
如何在 Lumen 上设置 Sentinel?起初,我得到了
找不到类“哨兵”
然后我注册了Sentinel并创建了一个别名如下:
$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');
然后我得到了:
缺少 Illuminate\Support\Manager::createDriver() 的参数 1,在第 88 行的 /Applications/MAMP/htdocs/projects/gexd/zeno-new/mobile/vendor/illuminate/support/Manager.php 中调用已定义。
【问题讨论】:
-
如果你已经使用了一个好的框架,为什么要这样做
class_alias? -
您是否尝试将其添加到作曲家中?
composer require cartalyst/sentinel "2.0.*"? cartalyst.com/manual/sentinel/2.0#installation
标签: php laravel lumen sentinel