From 7e39f8560abdde6e318bb8cab9f6486a3bc40876 Mon Sep 17 00:00:00 2001 From: OhmygoodR <109280933+OhmygoodR@users.noreply.github.com> Date: Tue, 23 Apr 2024 00:33:46 +0800 Subject: [PATCH] Update User.php --- app/Models/User.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/User.php b/app/Models/User.php index 6b9df01..5a6b29c 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -51,7 +51,7 @@ public function tasks() public function comments() { // TASK: add the code here for two-level relationship - $this->hasManyThrough(Comment::class,Task::class,'users_id','task_id','id','id'); + return $this->hasManyThrough(Comment::class,Task::class,'users_id','task_id','id','id'); }