public function response() { $logData = ['description' => 'in \\SelamiApp\\Hello\\Main::response()']; $Logs = new m\Logs($this->dbConn); $Logs->insert($logData); $this->csrfToken("Main"); return ['data' => ['deneme' => $this->request->getParam('deneme', 'set'), 'csrf_key' => $this->csrfTokenKey, 'csrf_token' => $this->csrfToken]]; }
public function response() { $logData = ['description' => 'in \\SelamiApp\\Hello\\Dear::response()']; $data_cache_key = 'Deneme'; $logs = $this->cache->get($data_cache_key); if ($logs === null) { $Logs = new m\Logs($this->dbConn); $Logs->insert($logData); $logs = $Logs->find(null, null, ['created_at' => 'desc'], 0, 30); $this->cache->set($data_cache_key, $logs); } $response = ['data' => ['Hello' => $this->args['name'], 'logs' => $logs, 'ack' => $this->common()]]; return $response; }