项目
在本地运行时出现异常错误。尝试获取找到非对象错误的属性"区域设置"。我真的不知道出了什么问题。
public function __construct() {
$this->global = Setting::first();
App::setLocale($this->global->locale);
Carbon::setLocale($this->global->locale);
setlocale(LC_TIME,$this->global->locale.'_'.strtoupper($this->global->locale));
}
添加了"区域设置"的此代码。
在__construct()
方法中var_dump(Setting::first());die();