作者 赵彬吉

update

@@ -56,19 +56,12 @@ class ReInquiryTask extends Base @@ -56,19 +56,12 @@ class ReInquiryTask extends Base
56 return $self; 56 return $self;
57 } 57 }
58 58
59 - public function setTarget($id, $target){  
60 - $self = self::where(['id' => $id])->first();  
61 - if (empty($self)) {  
62 -  
63 - }  
64 - }  
65 -  
66 /** 59 /**
67 * @param $value 60 * @param $value
68 * @return mixed 61 * @return mixed
69 */ 62 */
70 public function getTargetAttribute($value) 63 public function getTargetAttribute($value)
71 { 64 {
72 - return json_decode($value, true); 65 + return $value ? json_decode($value, true) : [];
73 } 66 }
74 } 67 }