public function show($id) { $curr['name'] = $this->lists['show']['name']; $curr['url'] = $this->lists['show']['url']; $result = ['data' => TalksModel::find($id), 'lists' => $this->lists, 'curr' => $curr]; return view('member.talk.show', $result); }
public function show($id) { $curr['name'] = $this->crumb['show']['name']; $curr['url'] = $this->crumb['show']['url']; $result = ['data' => TalksModel::find($id), 'crumb' => $this->crumb, 'curr' => $curr]; return view('admin.talk.show', $result); }
/** * 一些操作限制 */ public function tolimit($id, $msg) { $this->islogin(); $talkModel = TalksModel::find($id); if ($this->userid == $talkModel->uid) { echo "<script>alert('" . $msg . "!');history.go(-1);</script>"; exit; } return array('talkid' => $id, 'uid' => $this->userid); }
public function parent() { $pid = $this->pid ? $this->pid : 0; $parent = TalksModel::find($pid); return $parent ? $parent : ''; }