__('Draft'), 'doing' => __('Doing'), 'done' => __('Done'), 'cancel' => __('Cancel')]; } public function factory() { return $this->belongsTo('Factory', 'factory_id', 'id', [], 'LEFT')->setEagerlyType(0); } public function getStatusTextAttr($value, $data) { $value = $value ?: ($data['status'] ?? ''); $list = $this->getStatusList(); return $list[$value] ?? ''; } }