git commit "add favorites display with polymorphic relation"
This commit is contained in:
@@ -72,6 +72,10 @@ class Flight extends Model
|
||||
{
|
||||
return $this->hasMany(Comment::class);
|
||||
}
|
||||
public function favorites()
|
||||
{
|
||||
return $this->morphMany(Favorite::class, 'favoritable');
|
||||
}
|
||||
|
||||
#[Scope]
|
||||
public function applySearch(Builder $query, array $filters): void
|
||||
|
||||
Reference in New Issue
Block a user