title = "Category" url = "/category" layout = "Dashboard" is_hidden = 0 [session] security = "user" allowedUserGroups[] = "admin" allowedUserGroups[] = "supplier" redirect = "dashboard/login" == vendor; $this['categorys'] = Category::orderBy('created_at', 'desc')->get(); $this['active_category'] = Category::orderBy('created_at', 'desc')->where('published', 1)->count(); $this['all_category'] = Category::orderBy('created_at', 'desc')->count(); } $this['category'] = Category::make(); } function onDelete() { $categoryId = Input::post('id_category'); $category = Category::find($categoryId); if ($category) { $category->delete(); } return redirect()->refresh(); } ?> ==