git commit "add favorites display with polymorphic relation"

This commit is contained in:
2026-08-17 14:14:55 +03:30
parent 902384625b
commit ea1a0cc0c4
6 changed files with 61 additions and 73 deletions
+4
View File
@@ -62,4 +62,8 @@ class Tour extends Model
{
return $this->belongsTo(TravelType::class);
}
public function favorites()
{
return $this->morphMany(Favorite::class, 'favoritable');
}
}