$user, 'ip'=>$request->ip(), 'view_url'=>'http://'.\think\Env::get('host.hostname').'/'.$request->url(), 'view_time'=>$time, 'view_page'=>$page, ]; $addInfo = \app\model\BaseViewHistory::create($data); if ($addInfo){ return true; }else { return false; } } }