git commit "add favorites display with polymorphic relation"
This commit is contained in:
@@ -62,4 +62,8 @@ class Tour extends Model
|
||||
{
|
||||
return $this->belongsTo(TravelType::class);
|
||||
}
|
||||
public function favorites()
|
||||
{
|
||||
return $this->morphMany(Favorite::class, 'favoritable');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user