public function getEdit($id) { $track = Track::with('showSongs')->find($id); if (!$track) { return $this->notFound('Track ' . $id . ' not found!'); } if ($track->user_id != Auth::user()->id) { return $this->notAuthorized(); } return Response::json(Track::mapPrivateTrackShow($track), 200); }