mirror of
https://github.com/tiennm99/coolify.git
synced 2026-09-20 04:23:16 +00:00
feat(user): add changelog read tracking and unread count method
This commit is contained in:
1 parent
e8892b3d29
commit
0e7cc988a6
10 files changed
+887
-110
No files matched your search
@@ -203,6 +203,16 @@ class User extends Authenticatable implements SendsEmail
|
||||
return $this->belongsToMany(Team::class)->withPivot('role');
|
||||
}
|
||||
|
||||
public function changelogReads()
|
||||
{
|
||||
return $this->hasMany(UserChangelogRead::class);
|
||||
}
|
||||
|
||||
public function getUnreadChangelogCount(): int
|
||||
{
|
||||
return app(\App\Services\ChangelogService::class)->getUnreadCountForUser($this);
|
||||
}
|
||||
|
||||
public function getRecipients(): array
|
||||
{
|
||||
return [$this->email];
|
||||
|
||||
Reference in new issue
Block a user