ptgen api point support parameter & default user

This commit is contained in:
xiaomlove
2022-02-28 23:20:42 +08:00
parent 5ed80ed637
commit b9d5df232b
51 changed files with 447 additions and 51 deletions

View File

@@ -17,11 +17,11 @@ class Comment extends NexusModel
public function create_user()
{
return $this->belongsTo(User::class, 'user');
return $this->belongsTo(User::class, 'user')->withDefault(User::getDefaultUserAttributes());
}
public function update_user()
{
return $this->belongsTo(User::class, 'editedby');
return $this->belongsTo(User::class, 'editedby')->withDefault(User::getDefaultUserAttributes());
}
}