-
Notifications
You must be signed in to change notification settings - Fork 10
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
refactor: change code for improved readability and maintainability #7
Open
ILopesjr
wants to merge
11
commits into
elevensoft-dev:main
Choose a base branch
from
ILopesjr:feature/refactoring-changes
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
refactor: change code for improved readability and maintainability #7
ILopesjr
wants to merge
11
commits into
elevensoft-dev:main
from
ILopesjr:feature/refactoring-changes
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Corrected the port mentioned for accessing the application - Improved the clarity and consistency of the instructions - Ensured correct and consistent formatting
- Added comments to explain each target. - Grouped related targets together for better readability. - Used variables for repeated values like `docker-compose` and `php artisan` commands. - Added `.PHONY` targets to avoid conflicts with files of the same name. - Changed permissions in `fix-permissions` target to 755 for directories and 644 for files to enhance security. - Separated commands in `api-passport-generate` target to avoid execution errors.
- Added type hints for method parameters and return types. - Used dependency injection for the `User` model. - Moved validation logic to `StoreUserRequest` and `UpdateUserRequest` classes. - Ensured proper HTTP status codes and responses. - Added Swagger annotations for API documentation.
- Removed unnecessary `@var` annotations for properties already defined in the class. - Ensured proper use of `protected` or `public` visibility for properties. - Added missing relationships. - Ensured proper use of `Carbon` for date attributes. - Added Swagger annotations for API documentation.
- Added `authorize` method to always return `true`. - Defined validation rules for `name`, `email`, and `password` fields.
- Added `authorize` method to always return `true`. - Defined validation rules for `name`, `email`, and `password` fields.
- Executed `php artisan l5-swagger:generate` to update the API documentation. - Ensured that the latest changes are reflected in the Swagger docs.
fix: update User model to use Laravel Passport for API tokens - Added `use Laravel\Passport\HasApiTokens;` to the User model.
fix: update UserTableSeeder to avoid direct bcrypt usage - Modified UserTableSeeder to set plain password, which will be hashed automatically by the User model.
…tication - Set the `driver` for the `api` guard to `passport`. - Configured the `provider` for the `api` guard to `users`. - Set `hash` to `false` for the `api` guard.
- Add `L5_SWAGGER_USE_ABSOLUTE_PATH` set to `true`. - Add `L5_FORMAT_TO_USE_FOR_DOCS` set to `json`. - Add `L5_SWAGGER_GENERATE_ALWAYS` set to `true`.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.