/** * Load play video page * * @param $title * @return \Illuminate\Http\Response */ public function playVideo($title) { $recent = $this->recentVideos(); $categories = $this->getCategory(); $video = Video::where('slug', $title)->first(); $avatar = Avatar::whereUser_id($video->user_id)->first(); $video->avatar = $avatar->avatarURL; return view('pages.play', compact('categories', 'video', 'recent')); }