It fixes the remaining stale test and keeps the actual N+1 strategy:
* Main ticket index renders scalar agent_name. * Ticket index still eager-loads user, owner, agent. * Ticket show comments no longer eager-load fake owner / agent relations. * Updated the conflicting regression tests.
This commit is contained in:
@@ -365,7 +365,7 @@ final class TicketShow extends Component
|
||||
->when(! $this->canSeeInternalNotes(), static function ($query): void {
|
||||
$query->where('is_internal', false);
|
||||
})
|
||||
->with(['user.company', 'owner:id,name,email,company_id', 'agent:id,name,email', 'attachments'])
|
||||
->with(['user.company', 'attachments'])
|
||||
->oldest()
|
||||
->get();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user