diff --git a/app/Model/UserRelationBind.php b/app/Model/UserRelationBind.php index 1265197..f14f029 100644 --- a/app/Model/UserRelationBind.php +++ b/app/Model/UserRelationBind.php @@ -28,7 +28,7 @@ class UserRelationBind extends Model public function setJsonDataAttribute($value) { - $this->attributes['json_data'] = json_encode(json_decode($value, true)); + $this->attributes['json_data'] = $value ? json_encode(json_decode($value, true)) : ''; } } \ No newline at end of file