__('Forbidden'), 1 => __('Allow')]; } public function getStatusList() { return ['normal' => __('Normal'), 'hidden' => __('Hidden')]; } public function getEquipmentManageTextAttr($value, $data) { $value = $value ? $value : (isset($data['equipment_manage']) ? $data['equipment_manage'] : ''); $list = $this->getEquipmentManageList(); return isset($list[$value]) ? $list[$value] : ''; } 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, name'); } }