favorites

This commit is contained in:
2025-10-02 23:52:07 +03:00
parent dee8c09298
commit 1ed9235451
12 changed files with 194 additions and 2 deletions
+5
View File
@@ -40,4 +40,9 @@ class Workout extends Model
->withTimestamps()
->orderBy('workout_exercises.position');
}
public function favoritedBy()
{
return $this->belongsToMany(User::class, 'workout_favorites')->withTimestamps();
}
}