with('medias')->get()->first(); if($medias){ return $this->respondWithCollection($medias->medias, new MediaTransformer()); } return $this->errorNotFound(); } }