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
@@ -39,4 +39,9 @@ class Exercise extends Model
{
return $this->hasMany(WorkoutExercise::class);
}
public function favoritedBy()
{
return $this->belongsToMany(User::class, 'exercise_favorites')->withTimestamps();
}
}