title = "Location" url = "/location" layout = "Dashboard" is_hidden = 0 [session] security = "user" allowedUserGroups[] = "admin" allowedUserGroups[] = "supplier" redirect = "dashboard/login" == vendor; $this['locations'] = Location::orderBy('created_at', 'desc')->get(); $this['active_location'] = Location::orderBy('created_at', 'desc')->where('published', 1)->count(); $this['all_location'] = Location::orderBy('created_at', 'desc')->count(); } $this['location'] = Location::make(); } function onDelete() { $locationId = Input::post('id_location'); $location = Location::find($locationId); if ($location) { $location->delete(); } return redirect()->refresh(); } ?> ==