public function showthread($name) { $info = HelperFunctions::forum_url_info($name); if ($info['forum'] == 0) { return Redirect::to("/dien-dan.html"); } $threads = Thread::where('forum', $info['forum'])->orderBy('status', 'desc')->orderBy('updated_at', 'desc')->paginate(15); $view = ForumViewCount::find($info['forum']); $view->view = $view->view + 1.25; $view->save(); $data = array('threads' => $threads, 'seo' => $info, 'forums' => HelperFunctions::forum_list(), 'page' => "Forum", 'id' => Session::get('idCok'), 'coin' => Session::get('coinCok'), 'name' => $name); return View::make('template.neon.thread')->with($data); }
public function showthread($name) { $info = HelperFunctions::forum_url_info($name); if ($info['forum'] == 0) { return Redirect::to("/dien-dan.html"); } $threads = Thread::where('forum', $info['forum'])->orderBy('status', 'desc')->orderBy('updated_at', 'desc')->paginate(2); $view = ForumViewCount::find($info['forum']); $view->view = $view->view + 1.25; $view->save(); $seo['page'] = $info['h1']; $seo['title'] = $info['title']; $seo['discription'] = 'discription of this page'; $seo['forum'] = $info['forum']; $data = array('threads' => $threads, 'seo' => $seo, 'forums' => HelperFunctions::forum_list()); return View::make('template.flatkit.thread')->with($data); }