function (Relation $query) { $query->order('id asc'); } ])->where('uid', $uid)->find(); if (empty($model_post)) { return $this->error('链接已失效', '/'); } Cache::set($cache_key, $model_post,600); } $model_post->hits = $model_post->hits + 1; $model_post->save(); View::assign('post', $model_post); return View::fetch(); } }