public static function validateNameErrors($errors, $id) { if (count($errors) > 0) { $drink = Drink::findOne($id); $drink_types = DrinkType::listDrinkTypes(); $drink_ingredients = DrinkIngredient::listDrinkIngredients($id); View::make('drink/edit.html', array('attributes' => $drink, 'drink_types' => $drink_types, 'drink_ingredients' => $drink_ingredients, 'message' => $errors[0])); } }