public function show($id, $slug) { $post = Post::where('id', $id)->where('slug', $slug)->with('user.profile')->firstOrFail(); Read::setReadPoints($post); $title = "Question"; $currentQuestion = Question::getCurrentQuestion(); $points_pct = Question::getTotalPointsPct($currentQuestion); $remaining_time = Question::getRemainingTime($currentQuestion); $posts = Post::getRandPosts($currentQuestion); return View::make('posts.show')->with(['question' => $currentQuestion, 'remaining_time' => $remaining_time, 'points_pct' => $points_pct, 'posts' => $posts, 'selected_post' => $post, 'title' => $title]); }