Skip to content

Commit

Permalink
added lazy eager loading
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimir-xz committed Sep 5, 2024
1 parent ba548d3 commit f187641
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/Http/Controllers/TaskController.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ public function show(Request $request, Task $task, TaskComment $comment, TaskNot

$notifications = $notif->retrieveWithDelete();

$task->load('comments', 'comments.recipients:id,name');

return view('tasks.show', compact('task', 'comment', 'usersByIds', 'notifications'));
}

Expand Down

0 comments on commit f187641

Please sign in to comment.