__('Special'), 'important' => __('Important'), 'general' => __('General'), 'standby' => __('Standby') ]; } public function getRelationshipTextAttr($value, $data) { $value = $value ? $value : (isset($data['relationship']) ? $data['relationship'] : ''); $list = $this->getRelationshipList(); return isset($list[$value]) ? $list[$value] : ''; } public function getStatusList() { return ['normal' => __('Normal'), 'hidden' => __('Hidden')]; } public function getStatusTextAttr($value, $data) { $value = $value ? $value : (isset($data['status']) ? $data['status'] : ''); $list = $this->getStatusList(); return isset($list[$value]) ? $list[$value] : ''; } public function getSelectpicker() { $where = ['status' => 'normal']; return $this::where($where)->order('id desc')->column('id, concat("【", supplier_code, "】", name)'); } }