__('Status 0'), '1' => __('Status 1'), '-1' => __('Status -1')]; } public function getStatusTextAttr($value, $data) { $value = $value ?: ($data['status'] ?? ''); $list = $this->getStatusList(); return $list[$value] ?? ''; } public function order() { return $this->belongsTo('Order', 'order_id', 'id', [], 'LEFT')->setEagerlyType(0); } public function abnormal() { return $this->belongsTo('Abnormal', 'abnormal_id', 'id', [], 'LEFT')->setEagerlyType(0); } }