Commit fced7102 authored by King Alex's avatar King Alex

.\app\controllers\AdminController.php

Ajout de fonctions get vues admin
parent 33e465b2
......@@ -14,8 +14,9 @@ class AdminController extends BaseController {
*/
public function admin()
{
$recipes = Recipe::all();
$user=Confide::user();
return View::make('templates.admin.starter')->with('user',$user);
return View::make('templates.admin.recipes')->with(array('recipes'=>$recipes, 'user'=>$user));
}
// TODO : Cascade the ingredients / images so the deletion of one triggers the deletion of the other.
......@@ -36,6 +37,5 @@ class AdminController extends BaseController {
$images = Image::all();
$user=Confide::user();
return View::make('templates.admin.images')->with(array('images'=>$images, 'user'=>$user));
}
}
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