Attempt to fix N+1 issues still there and more now
This commit is contained in:
@@ -22,7 +22,8 @@ final class WorkflowNotificationService
|
||||
*/
|
||||
public function dispatch(Ticket $ticket, string $event, ?User $actor = null): void
|
||||
{
|
||||
$ticket->loadMissing(['owner', 'agent', 'status', 'priority', 'category', 'project', 'team', 'product']);
|
||||
$ticket->loadMissing(['user.company', 'owner.company', 'agent.company', 'status', 'priority', 'category', 'project', 'team', 'product']);
|
||||
$actor?->loadMissing('company');
|
||||
|
||||
WorkflowTemplate::query()
|
||||
->where('event', $event)
|
||||
|
||||
Reference in New Issue
Block a user