/** * Unwatch a video. * * @param $slug * @return mixed */ public function unwatchVideo($slug) { $slug = explode('-', $slug); $id = $slug[0]; $watchedVideo = $this->userVideo->find($id); if ($watchedVideo->count() > 0) { $watchedVideo->delete(); return redirect()->back()->withSuccess('Video unwatched'); } abort(404); }