__('Pending'), 'running' => __('Running'), 'success' => __('Success'), 'fail' => __('Fail')]; } public function getFileTypeList() { return ['image' => __('Image'), 'pdf' => __('Pdf')]; } 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] ?? ''; } }