Home > Backend Development > PHP Tutorial > laravel 设置entrust entrust:migration出现问题

laravel 设置entrust entrust:migration出现问题

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 20:12:16
Original
1104 people have browsed it

1.laravel版本5.1
安装entrust时,参照文档输入命令

<code>php artisan entrust:migration</code>
Copy after login
Copy after login

然后出现报错
laravel 设置entrust entrust:migration出现问题

求教如何解决

回复内容:

1.laravel版本5.1
安装entrust时,参照文档输入命令

<code>php artisan entrust:migration</code>
Copy after login
Copy after login

然后出现报错
laravel 设置entrust entrust:migration出现问题

求教如何解决

首先,5.1 用坑很多,5.2我在官方的issues也看到很低级的问题,下面仅列举出来踩到的比较低级的坑

1) 就是你这个问题
解决办法:修改文件:vendor/zizaco/entrust/src/commands/MigrationCommand.php 大约86行改为:

$usersTable = Config::get('auth.table');
$userModel = Config::get('auth.model');

官方解决了5.2有人提出的这个问题于是FIXED,又忽略了5.1,顾此失彼。

2) Trait method can has not been applied.
解决办法:修改 Users 模型文件,去掉 implements 中的 AuthorizableContract 和 去掉 use 中的 Authorizable,因为和ACL冲突了

3) This cache store does not support tagging.
看这:https://github.com/Zizaco/entrust/issues...

后面我放弃使用entust的想法,如果你继续使用应该你还会遇到一些问题,我个人是真担心真用上了发现了BUG发的那时间不如自己写一个,本人强迫症,绝对不会去修改vendor里的代码。

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template