mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-04-29 23:09:42 -05:00
(Update) Article+Comment Models
This commit is contained in:
+4
-1
@@ -31,7 +31,10 @@ class Article extends Model
|
||||
*/
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(\App\User::class);
|
||||
return $this->belongsTo(\App\User::class)->withDefault([
|
||||
'username' => 'System',
|
||||
'id' => '1'
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+4
-1
@@ -51,7 +51,10 @@ class Comment extends Model
|
||||
*/
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(\App\User::class);
|
||||
return $this->belongsTo(\App\User::class)->withDefault([
|
||||
'username' => 'System',
|
||||
'id' => '1'
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user