php - Laravel Voyager 新用户登录中的非法字符串偏移“区域设置”错误
问题描述
我正在为我的网络应用程序使用 Laravel Voyager。
当我添加一个新的贡献者用户并尝试进入他的仪表板时。我收到“非法字符串偏移 'locale'”错误。
错误路径:/home/turongro/public_html/vendor/tcg/voyager/src/Models/User.php
错误行:
public function getLocaleAttribute()
{
return $this->settings['locale'];
}
在收到此错误之前,我'locale' => 'ru'
在 config/app.php 中进行了更改
解决方案
如本期回复settings
中所述,您可以在里面的演员表中添加字段app/User.php
:
protected $casts = [
'email_verified_at' => 'datetime',
'settings' => 'json'
];
推荐阅读
- python - py_call_impl 中的错误,当在 R 的 phate 中使用 knn.dist.method = 'precomputed'
- python - 如何使用 Django 对两个以上的表进行连接?
- javascript - req.files keeps returning undefined
- regex - 正则表达式:将接下来的两行(选项卡)放在第一个返回
- python - 完整的 Python 类
- python - 使用理解编辑列表元素会删除部分列表
- macos - 我无法安装diesel-cli 与火箭一起使用
- python - 如何在组python pandas中按行查找百分比变化
- html - 如何使用 html 和 css 使框彼此相邻
- javascript - React-spring 仅适用于 react-three-fiber 中的 Canvas