版本 Laravel 5.4
我把users 表 换成 admins 表了 其他都没变
在Admin model 中 下面方法 的 $this->roles 报错了!
public function hasRole($role) {
if(is_string($role)){
return $this->roles->contains('name', $role);
}
return !! $role->intersect($this->roles)->count();
}
这个是什么问题
Whoops, looks like something went wrong.
(2/2) QueryException
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'redis.admin_role' doesn't exist (SQL: select `roles`.*, `admin_role`.`admin_id` as `pivot_admin_id`, `admin_role`.`role_id` as `pivot_role_id` from `roles` inner join `admin_role` on `roles`.`id` = `admin_role`.`role_id` where `admin_role`.`admin_id` = 1)
为什么是 redis.admin_role 而不是 redis.role_admin
这样肯定可以啊!但是这个 Personal Access Token 泄漏了的话 是不是意味着 别人也可以访问了?
gitHub这种应用程序的貌似不是很符合我所想要的吧,我不需要给回调url啊不要点击授权然后再跳转这种的!
分发 Personal Access Token 后这个东西一直保存在手机端吗?手机端需要请求的时候用这个Token来请求吗?还有怎么区分这个token是 Personal Access Token 还是 password用户名密码的token啊 ?我主要是不理解这个过程具体是怎么样子的
这个我看过 视频中的OAuth 完整流程应该我用不到吧,Personal token 的话视频中不是说开发者测试用吗?已经懵了哈哈哈,我现在主要是不知道用哪种方式去做 我上面讲的第二种情况