/**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     $RecipeItems = RecipeItems::findOrFail($id);
     $recipe = Recipes::findOrFail($RecipeItems->recipe_id);
     if ($RecipeItems->type == 'recipe') {
         $item = Recipes::findOrFail($RecipeItems->sub_recipe);
     } else {
         $item = Items::findOrFail($RecipeItems->item_id);
     }
     $RecipeItems->delete();
     Helper::add($id, 'deleted ' . $RecipeItems->type . ' ' . $item->title . ' (ID ' . $RecipeItems->id . ') from recipe ' . $recipe->title . ' (ID ' . $recipe->id . ')');
     Session::flash('flash_message', $this->title . ' successfully deleted!');
     return Redirect::action('RecipeItemsController@index', ['recipe_id' => $recipe->id]);
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     $Recipe = Recipes::findOrFail($id);
     if ($Recipe->menus()->count() > 0) {
         Session::flash('flash_message', $this->title . ' is assigned to menu and cannot be deleted, unassign first!');
     } else {
         Session::flash('flash_message', $this->title . ' successfully deleted!');
         Helper::add($id, 'deleted recipe ' . $Recipe->title . ' (ID ' . $Recipe->id . ')');
         $Recipe->delete();
     }
     return Redirect::action('RecipesController@index');
 }