mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 12:30:49 +08:00
temporary invite
This commit is contained in:
@@ -360,6 +360,15 @@ class User extends Authenticatable implements FilamentUser, HasName
|
||||
return $this->belongsTo(User::class, 'invited_by');
|
||||
}
|
||||
|
||||
public function temporary_invites()
|
||||
{
|
||||
return $this->hasMany(Invite::class, 'inviter')
|
||||
->where('invitee', '')
|
||||
->whereNotNull('expired_at')
|
||||
->where('expired_at', '>=', Carbon::now())
|
||||
;
|
||||
}
|
||||
|
||||
public function send_messages()
|
||||
{
|
||||
return $this->hasMany(Message::class, 'sender');
|
||||
|
||||
Reference in New Issue
Block a user