public function cafes() { // TODO: $info = new Info($this->db); $information = $info->all()[0]; $this->f3->set('aboutUs', $information->about); $this->f3->set('isCafes', 'active'); $this->f3->set('isBlurred', 'blur'); $this->f3->set('view', 'user/cafes.html'); }
public function getInfo() { // TODO: $result = array('success' => false, 'message' => '', 'total' => 0, 'record' => null); $info = new Info($this->db); $info->all(); foreach ($info as $field => $value) { $result[record][$field] = $value; } $result[success] = true; $result[message] = 'Successfully retrieved data'; $result[status] = 'success'; header('Content-Type: application/json'); echo json_encode($result, JSON_NUMERIC_CHECK); exit; }