public function main_layout() { $this->data['css_assets'] = AppAssets::load('css', ['bootstrap', 'animate', 'font-awesome', 'icon', 'font', 'app', 'jquery-treegrid']); $this->data['js_assets'] = AppAssets::load('js', ['jquery', 'datagrid', 'validate', 'disabler', 'enabler', 'form', 'bootstrap', 'app', 'jquery-slimscroll', 'app-plugin', 'jquery-treegrid']); $this->data['menus'] = Menu::all(); $this->data['groups'] = Role::all(); $this->data['title'] = 'Administrator'; $this->data['page_title'] = 'Privilege Page'; $this->data['page_subtitle'] = 'Anda sedang berada di : App » Privilege List'; return view('app/components/main_layout')->with('data', $this->data)->nest('content', 'app/privilege/main', array('data' => $this->data)); }
/** * Show the application dashboard to the user. * * @return Response */ public function index($page = null) { $page = isset($page) ? 'bootstrap' : 'index'; // get all the Slider $sliders = Slider::all(); // get all the Contact $contacts = Contact::all(); // get all the Project_image $project_images = Project_image::orderBy('position')->get(); // get all the Projects $projects = Project::orderBy('position')->get(); // get all the service_details $service_details = Service_detail::orderBy('position')->get(); // get all the services $services = Service::orderBy('position')->get(); // get all the menus $menus = Menu::orderBy('position')->get(); // load the view and pass the menus // load the view and pass the services return \View::make($page)->with('sliders', $sliders)->with('contacts', $contacts)->with('project_images', $project_images)->with('projects', $projects)->with('service_details', $service_details)->with('services', $services)->with('menus', $menus); }
/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { // delete $menu = Menu::find($id); $menu->delete(); // redirect \Session::flash('message', 'Successfully deleted the menu!'); return \Redirect::to('admin/menus'); }
public function __construct() { $this->data['list_menu'] = Menu::getMenu(); $this->data['active_user'] = Sentinel::getUser()->first_name; $this->data['active_menu'] = $this->activeMenu($this->data['list_menu']); }