public function showDataAction() { $data = new Data(); $per_page = Config::get('nhc/site.data_perpage'); $datas = $data->getAllData($per_page); return View::make('data.data')->with('paginator', $datas); }
public function getAllData() { $users = parent::getAllData(); //get user roles foreach ($users as $key => $value) { $sql = "SELECT map.admin_role_id, r.name " . "FROM admin_roles_admin_users map " . "JOIN admin_roles r on r.id = map.admin_role_id " . "WHERE map.admin_user_id = :user"; $query = $this->_db->prepare($sql); $query->bindParam(':user', $value['id']); $query->execute(); $role = $query->fetchObject(); if (!empty($role)) { $users[$key]['role'] = $role->admin_role_id; $users[$key]['role_name'] = $role->name; } } return $users; }
public function getMarkets() { $users = parent::getAllData(); return $users; }
public function getAllData() { $winners = parent::getAllData(); return $winners; }