/**
  * @param \HorseStories\Models\Palmares\Palmares $palmares
  */
 public function delete(Palmares $palmares)
 {
     $status = $this->statuses->findById($palmares->status->id);
     $status->delete();
     $event = $this->events->findById($palmares->event->id);
     $event->delete();
     $palmares->delete();
 }
 /**
  * @return \Illuminate\View\View
  */
 public function home()
 {
     if (Auth::check()) {
         $horses = $this->horses->findHorsesForSelect(Auth::user());
         if (count($horses)) {
             $statuses = $this->statuses->getFeedForUser(Auth::user());
             $likes = DB::table('likes')->whereUserId(Auth::user()->id)->lists('status_id');
         } else {
             $statuses = [];
         }
     }
     return view('pages.home', compact('horses', 'statuses', 'likes'));
 }
 /**
  * @param string $slug
  * @return \Illuminate\View\View
  */
 public function show($slug)
 {
     $horse = $this->horses->findBySlug($slug);
     $statuses = $this->statuses->getFeedForHorse($horse);
     $likes = DB::table('likes')->whereUserId(Auth::user()->id)->lists('status_id');
     return view('horses.show', compact('horse', 'likes', 'statuses'));
 }
 /**
  * @param int $statusId
  * @return \HorseStories\Models\Statuses\Status
  */
 private function initStatus($statusId)
 {
     $status = $this->statuses->findById($statusId);
     if ($status->user()->id == Auth::user()->id) {
         return $status;
     }
     abort(403);
 }