You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enhancement of API Documentation: The instructions on defining relationships have been updated in the relations.md to provide thorough clarity. Now, it includes two ways of defining the relationships, both by using the fields method as well as the conventional related method.
Inclusion of Example Codes: To provide a better understanding of defining relationships, code snippets for belongsTo, hasMany, and others have been added alongside their use with the fields method.
Redesign of OpenAiSolution.php: The structure of the messages array has gone through a revamp, which led to the elimination of redundant array nesting, making it much more uncomplicated and cleaner to decipher.
Improvements in collectFields Method: The method in Repository.php has seen enhancement with the introduction of a new variable $regularFields. This additional variable helps filter the eager fields before moving towards the return step with the FieldCollection.
Upgrades in collectRelated Method: The method in InteractWithSearch.php has been amplified for functionality. Now, if there are no predefined relationships, it checks and initiates the related fields.
New Helper Functions Added: The file helpers.php now includes several helper functions to assist in defining relationship fields like belongsTo, belongsToMany, hasOne, and hasMany. Moreover, the system checks for their existence and creates them only if they do not exist previously.
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
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.
Added:
🔗 Relationship Helper Functions Directly Within the
fieldsmethodAvailable helpers:
belongsTo()
belongsToMany()
hasOne()
hasMany()
morphTo()
morphOne()
morphMany()
morphToMany()
morphedByMany()