Commit fed04f49 authored by King Alex's avatar King Alex

Suppression des images en CRUD

parent 10d95c50
......@@ -38,4 +38,19 @@ class AdminController extends BaseController {
$user=Confide::user();
return View::make('templates.admin.images')->with(array('images'=>$images, 'user'=>$user));
}
public function imageRemove($id){
$image = Image::find($id);
$image->delete();
return $this->recipeImages();
}
public function recipeRemove($id){
$recipe = Recipe::find($id);
$recipe->delete();
return $this->recipeList();
}
public function ingredientRemove($id){
$ingredient = Ingredient::find($id);
$ingredient->delete();
return $this->recipeIngredients();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment