public function delete($ingredientIdArray)
 {
     if (is_array($ingredientIdArray)) {
         foreach ($ingredientIdArray as $ingredientID) {
             Otheringredients::where('id', '=', $ingredientID)->delete();
         }
     }
 }
 public function addNewRecipeToDb()
 {
     // @todo add all otherIngredients to the recipe as well
     $newRecipe = new Recipes();
     $plantRecipe = new PlantRecipe();
     $recipeId = sizeof(Recipes::all()) + 1;
     $plants = Plants::all();
     $otherIngredients = Otheringredients::all();
     $plantsAddedToRecipeArray = array();
     $this->recipeSetup($newRecipe);
     foreach ($plants as $plant) {
         if (Input::get('plantId_' . $plant->id) === 'yes') {
             $plantsAddedToRecipeArray[] = $plant->id;
         }
     }
     $plantRecipe->savePlantRecipeConnectionToDb($recipeId, $plantsAddedToRecipeArray);
     $newRecipe->save();
     $data = array('plants' => $plants, 'otherIngredients' => $otherIngredients);
     return View::make('addRecipeView')->with('data', $data);
 }