private function checkToken() { $row = Model::ApiAuth()->where(['token', '=', $this->token])->first(true); if ($row) { $row->setExpiration(time() + 3600)->save(); return true; } Api::forbidden(); }