feat: update Flight.php and User.php

This commit is contained in:
2026-08-18 14:28:53 +03:30
parent 8fd53aa19d
commit a1e0fab006
2 changed files with 9 additions and 0 deletions
+5
View File
@@ -102,4 +102,9 @@ class Flight extends Model
{ {
return $this->morphMany(Favorite::class, 'favoritable'); return $this->morphMany(Favorite::class, 'favoritable');
} }
public function comments()
{
return $this->morphMany(Comment::class, 'commentable');
}
} }
+4
View File
@@ -76,4 +76,8 @@ class User extends Authenticated
{ {
return $this->hasMany(Favorite::class); return $this->hasMany(Favorite::class);
} }
public function comments()
{
return $this->hasMany(Comment::class);
}
} }