Conversation
Codecov Report❌ Patch coverage is 🚀 New features to boost your workflow:
|
3787ac9 to
14350e1
Compare
68cb315 to
a22faff
Compare
ff68597 to
fab7484
Compare
de216e2 to
e5c67c8
Compare
Member
Author
|
See #3616 |
This file contains hidden or 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
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.
This pull request introduces significant changes to the handling of tags in the application. It replaces the previous string-based tag system with a relational model using a new
Tagentity. This change affects multiple parts of the codebase, including models, controllers, resources, and database interactions. The key improvements include better tag management, relational mapping between photos and tags, and enhanced query capabilities.Tag System Overhaul:
Introduction of the
TagModel:Tagmodel (app/Models/Tag.php) has been added to represent tags as entities in the database. It includes methods for relational mapping with photos and a utility methodTag::from()to fetch or create tags dynamically.Relational Mapping Between Photos and Tags:
Photomodel now includes atags()method to define aBelongsToManyrelationship with theTagmodel, replacing the previous array-based tag handling.Refactoring of Tag Album:
TagAlbummodel now uses theTagArrayCastclass to handle tags asTagobjects instead of strings.Controller and Resource Updates:
Tag Management in Controllers:
PhotoControllerandAlbumControllernow handle tags using theTagmodel, including syncing tags with photos and dynamically creating tags if they don't exist. [1] [2]Resource Representation:
namein API resources likePhotoResourceandTagAlbumResource. This ensures API responses are more user-friendly and consistent. [1] [2]Query and Search Enhancements:
Improved Query Handling:
PhotoSearchandFrameController. [1] [2]Custom Query Builder for Tags:
TagBuilderclass has been introduced to extend query capabilities for theTagmodel.These changes collectively enhance the application's ability to manage and query tags, improving both backend efficiency and frontend usability.