-
Notifications
You must be signed in to change notification settings - Fork 0
#23 - user profile setup #29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements user profile management functionality, including profile viewing, updating, and avatar handling. The changes add database fields for extended user information (first/last name, birth date, height, weight, gender), create API endpoints for profile operations, and implement avatar upload/delete/retrieval features with identicon fallbacks.
- Adds user profile fields to the database schema and User model
- Implements profile CRUD operations with corresponding controllers, actions, and request validation
- Adds avatar management with PNG upload support and SVG identicon fallbacks
Reviewed changes
Copilot reviewed 20 out of 21 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Feature/ProfileTest.php | Comprehensive feature tests for profile viewing, updating, and avatar operations |
| routes/api.php | Adds authenticated and public profile endpoints |
| database/migrations/0001_01_01_000000_create_users_table.php | Extends users table with profile fields (first_name, last_name, birth_date, height, weight, gender) |
| database/factories/UserFactory.php | Updates factory to use Hash::make for password generation |
| config/filesystems.php | Configures avatars disk for local storage |
| composer.json | Adds intervention/image-laravel and yzalis/identicon dependencies |
| app/Models/User.php | Updates User model with new fillable fields, casts, and avatar attribute accessor |
| app/Http/Resources/UserResource.php | Creates UserResource for API responses with profile data |
| app/Http/Requests/UpdateProfileRequest.php | Validates profile update requests with field-specific rules |
| app/Http/Requests/ChangeAvatarRequest.php | Validates avatar uploads (PNG only, max 2MB) |
| app/Http/Controllers/Profile/ProfilesController.php | Implements public profile listing and viewing endpoints |
| app/Http/Controllers/Profile/ProfileController.php | Handles authenticated profile operations (view, update, avatar changes) |
| app/Helpers/IdenticonHelper.php | Provides helper methods for generating identicon URLs and images |
| app/Enums/Gender.php | Defines Gender enum with Male/Female cases |
| app/Actions/Profile/UpdateProfileAction.php | Encapsulates profile update logic |
| app/Actions/Avatars/GetDefaultAvatarAction.php | Generates SVG identicon fallback avatars |
| app/Actions/Avatars/GetAvatarAction.php | Retrieves uploaded PNG avatars from storage |
| app/Actions/Avatars/DeleteAvatarAction.php | Handles avatar deletion from storage |
| app/Actions/Avatars/ChangeAvatarAction.php | Stores uploaded avatar files |
| Taskfile.yml | Adds test database creation task and updates test command |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 23 out of 24 changed files in this pull request and generated 21 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
No description provided.