Exception Error when projects run on the local.Trying to get property 'locale' of non-object error found.I really don't know what is wrong.
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));
}
This code where 'locale' added.
Make var_dump(Setting::first());die();
in your __construct()
method
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.