new helpdesk module
This commit is contained in:
@@ -86,7 +86,13 @@ final class Ticket extends Model
|
||||
/** @return HasMany<Comment> */
|
||||
public function comments(): HasMany
|
||||
{
|
||||
return $this->hasMany(Comment::class, 'ticket_id')->latest();
|
||||
return $this->hasMany(Comment::class, 'ticket_id')->whereNull('parent_id')->with(['user', 'attachments', 'replies.user', 'replies.attachments', 'replies.replies.user'])->oldest();
|
||||
}
|
||||
|
||||
/** @return HasMany<GitCommit> */
|
||||
public function gitCommits(): HasMany
|
||||
{
|
||||
return $this->hasMany(GitCommit::class, 'ticket_id')->latest('committed_at');
|
||||
}
|
||||
|
||||
/** @return HasMany<Attachment> */
|
||||
|
||||
Reference in New Issue
Block a user