From a1e0fab0061165fe5f1ba49a045768d34dd91fd8 Mon Sep 17 00:00:00 2001 From: Windows Store Date: Tue, 18 Aug 2026 14:28:53 +0330 Subject: [PATCH] feat: update Flight.php and User.php --- app/Models/Flight.php | 5 +++++ app/Models/User.php | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/app/Models/Flight.php b/app/Models/Flight.php index f19e3a8..5ea9ac7 100644 --- a/app/Models/Flight.php +++ b/app/Models/Flight.php @@ -102,4 +102,9 @@ class Flight extends Model { return $this->morphMany(Favorite::class, 'favoritable'); } + + public function comments() + { + return $this->morphMany(Comment::class, 'commentable'); + } } diff --git a/app/Models/User.php b/app/Models/User.php index e0ba453..3514892 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -76,4 +76,8 @@ class User extends Authenticated { return $this->hasMany(Favorite::class); } + public function comments() + { + return $this->hasMany(Comment::class); + } }