__('Status 1'), '0' => __('Status 0'), '2' => __('Status 2')]; } public function getMsgTypeList() { $options = config('message_push_options'); $list = []; foreach ($options as $index => $item){ $list[$index] = $item['name']; } return $list; } public function getStatusTextAttr($value, $data) { $value = $value ? $value : (isset($data['status']) ? $data['status'] : ''); $list = $this->getStatusList(); return isset($list[$value]) ? $list[$value] : ''; } public function getMsgTypeTextAttr($value, $data) { $value = $value ? $value : (isset($data['msg_type']) ? $data['msg_type'] : ''); $list = $this->getMsgTypeList(); return isset($list[$value]) ? $list[$value] : ''; } }