Esempio n. 1
0
 /**
  * 审核页面
  *
  * @param int $id
  * @return Response
  */
 public function edit($id)
 {
     $log = Comment::find($id);
     $signs = Comment::recognizeCommands($log->metas->message);
     $program = Program::dated($log->metas->thread_key)->enabled()->first();
     $participants = Participant::get();
     return View::make('admin/contributions/edit', ['log' => $log, 'signs' => $signs, 'program' => $program, 'participants' => $participants]);
 }
Esempio n. 2
0
 /**
  * 获取页面浏览数
  *
  * @param int $date
  * @return Response
  */
 public function getPvCounts($date)
 {
     Program::dated($date)->increment('view_counts');
     $counts = Program::dated($date)->value('view_counts');
     return Response::json(['total' => $counts]);
 }