public function getHomePage($id = null) { $homes = HomePage::orderBy('id')->get(); if ($id) { $home = HomePage::find($id); } else { $home = null; } return View::make('admin.home', array('homes' => $homes, 'home' => $home)); }
public function getIndex() { $homePage = HomePage::orderBy('order_id')->get(); return View::make('site.index', array('homePage' => $homePage)); }