feat: update Flight.php and User.php
This commit is contained in:
@@ -102,4 +102,9 @@ class Flight extends Model
|
||||
{
|
||||
return $this->morphMany(Favorite::class, 'favoritable');
|
||||
}
|
||||
|
||||
public function comments()
|
||||
{
|
||||
return $this->morphMany(Comment::class, 'commentable');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,4 +76,8 @@ class User extends Authenticated
|
||||
{
|
||||
return $this->hasMany(Favorite::class);
|
||||
}
|
||||
public function comments()
|
||||
{
|
||||
return $this->hasMany(Comment::class);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user