public function getCommentsForBeverageJson($id) { $json = Beverage::getAllCommentsByBeverage($id); header('Content-type: application/json'); return $json; }