From 577bb9ae31196b7b884834e0c28060ffa1d50a7d Mon Sep 17 00:00:00 2001 From: Bahar Date: Mon, 17 Aug 2026 14:07:12 +0330 Subject: [PATCH] fix:edit flight models --- app/Models/Flight.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/Models/Flight.php b/app/Models/Flight.php index f1fa087..579b6fb 100644 --- a/app/Models/Flight.php +++ b/app/Models/Flight.php @@ -97,10 +97,12 @@ class Flight extends Model return $this->hasMany(Booking::class); } - public function comments() - { - return $this->hasMany(Comment::class); - } + public function comments() + { + return $this->hasMany(Comment::class) + ->where('status', 1) + ->latest(); + } public function favorites() {