我有两个独立的项目:
使用共享代码库(数据库,模型......)
在我的Admin项目中,我使用spatie/laravel-permission
,但此包不适用于Lumen,即当我尝试在我的Lumen项目(API)中安装包时出现此错误:
致命错误:未捕获ReflectionException:类path.storage不存在于/var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php:681堆栈跟踪:#0 / var / www /html/vendor/laravel/framework/src/Illuminate/Container/Container.php(681):ReflectionClass-> __ construct(' path.storage')#1 / var / www / html / vendor / laravel / framework / src / Illuminate / Container / Container.php(565):Illuminate \ Container \ Container-> build(' path.storage')#2 / var / www / html / vendor / laravel /lumen-framework/src/Application.php(208):Illuminate \ Container \ Container-> make(' path.storage')#3 / var / www / html / vendor / laravel / framework / src / Illuminate / Foundation / helpers.php(105):Laravel \ Lumen \ Application-> make(' path.storage')#4 / var / www / html / vendor / laravel / framework / src /Illuminate/Foundation/helpers.php(800):app(' path.storage')#5 /var/www/html/vendor/laravel/lumen-framework/config/view.php(31) :storage_path(' framework / views')#6 / var / www / html / vend或/ laravel / lumen-framework / src / Application.php(575):require(' / var / www / html / v ...')#7 / var / www / html / in /第681行的var / www / html / vendor / laravel / framework / src / Illuminate / Container / Container.php
致命错误:未捕获Symfony \ Component \ Debug \ Exception \ FatalErrorException:未捕获ReflectionException:类path.storage在/var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php中不存在:681堆栈跟踪:#0 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(681):ReflectionClass-> __ construct(' path.storage') #1 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(565):Illuminate \ Container \ Container-> build(' path.storage')# 2 /var/www/html/vendor/laravel/lumen-framework/src/Application.php(208):Illuminate \ Container \ Container-> make(' path.storage')#3 / var /www/html/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(105):Laravel \ Lumen \ Application-> make(' path.storage')#4 / var / www / html / vendor / laravel / framework / src / Illuminate / Foundation / helpers.php(800):app(' path.storage')#5 / var / www / html / vendor / laravel / lumen -framework /配置/ view.php(31 ):storage_path('框架/视图')#6 / var / www / html / vendor / laravel / lumen-framework / src / Appli in / var / www / html / vendor / laravel / framework / src第681行/Illuminate/Container/Container.php
问题出在哪里?我可以在Lumen使用这个包吗? 或者你能为我推荐一些其他的角色& amp; Laravel和Lumen的许可工作。
答案 0 :(得分:0)
我看到 spatie / laravel-permission 存储库不支持Lumen
试着看看这可能适合你 http://www.laraveldoctrine.org/docs/1.2/acl