rootandClaude Sonnet 5 e8173ff90a Build out the trainer role
is_trainer was captured at signup and stored, but nothing in the app
used it - no client roster, no way to assign anything, a dead flag that
misled users who checked it during registration.

Adds a trainer/client link (a trainer adds a client by the email they
registered with) and lets a trainer create workouts directly on a
client's account (assigned_by_trainer_id on workouts). Deliberately
scoped for privacy: a trainer only ever sees/manages the workouts they
authored and assigned - not a client's other private data (their own
workouts, weight log, health notes, session/completion history). That
boundary needs a consent or notification system to relax safely, which
doesn't exist yet, so it's left for a follow-up rather than building it
half-safe.

WorkoutController's authorization now distinguishes "manage" (owner or
assigning trainer - view, add/edit exercises) from "own" (owner only -
delete), so a trainer can build out an assigned workout's exercises
after creating it, but can't delete a client's workout out from under
them.

Found a real bug via live testing before committing: the client roster
page eager-loaded `assignedWorkouts` (keyed by assigned_by_trainer_id)
on each client record, which is the trainer's own perspective, not the
client's - so it silently showed "no workouts assigned" even after
assigning one. Fixed to eager-load `workouts` filtered by
assigned_by_trainer_id instead, with a regression test.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-10 12:28:23 +03:00
2026-08-10 12:28:23 +03:00
2026-08-10 12:28:23 +03:00
2025-10-02 22:52:13 +03:00
2026-08-10 12:28:23 +03:00
2026-08-10 12:28:23 +03:00
2025-10-02 22:52:13 +03:00
2026-08-10 12:28:23 +03:00
2026-08-10 12:28:23 +03:00
2025-10-02 22:52:13 +03:00
2026-08-10 12:28:23 +03:00
2025-10-02 22:52:13 +03:00
2025-10-02 22:52:13 +03:00
2025-10-02 22:52:13 +03:00
2025-10-02 22:52:13 +03:00
2025-10-02 22:52:13 +03:00
2025-10-02 22:52:13 +03:00
2025-10-02 22:52:13 +03:00
2025-10-02 22:52:13 +03:00
2025-10-02 22:52:13 +03:00
2025-10-02 22:52:13 +03:00
2025-10-02 23:52:07 +03:00
2025-10-02 22:52:13 +03:00

Laravel Logo

Build Status Total Downloads Latest Stable Version License

About Laravel

Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:

Laravel is accessible, powerful, and provides tools required for large, robust applications.

Learning Laravel

Laravel has the most extensive and thorough documentation and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.

You may also try the Laravel Bootcamp, where you will be guided through building a modern Laravel application from scratch.

If you don't feel like reading, Laracasts can help. Laracasts contains thousands of video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.

Laravel Sponsors

We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the Laravel Partners program.

Premium Partners

Contributing

Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the Laravel documentation.

Code of Conduct

In order to ensure that the Laravel community is welcoming to all, please review and abide by the Code of Conduct.

Security Vulnerabilities

If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via taylor@laravel.com. All security vulnerabilities will be promptly addressed.

License

The Laravel framework is open-sourced software licensed under the MIT license.

S
Description
No description provided
Readme
368 KiB
Languages
PHP 53.9%
Blade 46%
JavaScript 0.1%