/**
  * UnPublish cv
  *
  * @param  int  $id
  * @return redirect
  */
 public function postUnpublish()
 {
     $cv = CV::where('user_id', '=', Auth::user()->id)->first();
     $cv->published = false;
     $cv->save();
     return redirect('profile');
 }
 public function renderPDF($slug)
 {
     $cv = CV::where('slug', '=', $slug)->first();
     if ($cv && $cv->published) {
         return view('pdf')->with('cv', $cv);
     } else {
         return redirect('/');
     }
 }