hasMany(MaterialCase::class, 'designer_id','id'); } public function getVcrAttr($value) { if (empty($value)) return $value; $domain = config('app.ali_oss_bindurl'); $item = 'https://' . $domain . '/' . $value; return $item; } public function getHeadimgurlAttr($value) { if (empty($value)) return $value; $domain = config('app.ali_oss_bindurl'); $item = 'https://' . $domain . '/' . $value; return $item; } public function getGoodAtAttr($value) { if (empty($value)) return []; $res = explode(',',$value); return $res; } public function getGoodHouseAttr($value) { if (empty($value)) return []; $res = explode(',',$value); return $res; } public function employee() { return $this->belongsTo(Employee::class)->bind(['employee_name'=>'name']); } }