mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 20:40:49 +08:00
torrent api + swip constants
This commit is contained in:
@@ -9,4 +9,19 @@ class Message extends NexusModel
|
||||
protected $fillable = [
|
||||
'sender', 'receiver', 'added', 'subject', 'msg', 'unread', 'location', 'saved'
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'added' => 'datetime',
|
||||
];
|
||||
|
||||
public function send_user()
|
||||
{
|
||||
return $this->belongsTo(User::class, 'sender')->withDefault(['id' => 0, 'username' => 'System']);
|
||||
}
|
||||
|
||||
public function receive_user()
|
||||
{
|
||||
return $this->belongsTo(User::class, 'receiver');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user