Add favorite toggle to yoga poses
Exercises and workouts both have a favorite toggle; yoga poses had an otherwise identical browse/filter UX but no way to favorite them - an inconsistency rather than a deliberate omission. Mirrors the existing exercise/workout favorite pattern exactly: a pivot table, a belongsToMany on User, and a toggle button on the pose detail page. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -26,6 +26,7 @@ Route::middleware('auth')->group(function () {
|
||||
// Favorites
|
||||
Route::post('/exercises/{exercise}/favorite', [\App\Http\Controllers\FavoriteController::class, 'toggleExercise'])->name('exercises.favorite');
|
||||
Route::post('/workouts/{workout}/favorite', [\App\Http\Controllers\FavoriteController::class, 'toggleWorkout'])->name('workouts.favorite');
|
||||
Route::post('/yoga/{pose}/favorite', [\App\Http\Controllers\FavoriteController::class, 'toggleYogaPose'])->name('yoga.favorite');
|
||||
|
||||
// Exercise alias (per-user rename)
|
||||
Route::post('/exercises/{exercise}/alias', [\App\Http\Controllers\ExerciseAliasController::class, 'store'])->name('exercises.alias');
|
||||
|
||||
Reference in New Issue
Block a user