__('Status normal'),'hidden' => __('Status hidden')]; } public function getStatusTextAttr($value, $data) { $value = $value ? $value : $data['status']; $list = $this->getStatusList(); return isset($list[$value]) ? $list[$value] : ''; } public function getOne($id) { $redisKey = 'SUT:'.$id; if (Redis::instance()->exists($redisKey)) { return json_decode(Redis::instance()->get($redisKey), true); } $row = $this->get($id); $result = $row ? $row->toArray() : []; Redis::instance()->set($redisKey, json_encode($result), 86400); return $result; } }