Repository navigation
release: Core API v1.6.72 — searchable columns registered at runtime - #317
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #317 +/- ##
===========================================
Coverage 100.00% 100.00%
- Complexity 8931 8935 +4
===========================================
Files 473 473
Lines 28057 28064 +7
===========================================
+ Hits 28057 28064 +7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
roncodes
force-pushed
the
release/v1.6.72
branch
from
October 19, 2026 05:02
6a32718 to
e8349a1
Compare
Searchable::addSearchableColumns() registers extra columns per model class, merged into getSearchableColumns() and searcheableFields(). Extensions can make their own data findable through a core or Fleet-Ops model's search (e.g. a companion record's reference number on orders) without editing the model; dot-notation relation columns may name relations added with resolveRelationUsing(). Covered by a unit test.
roncodes
force-pushed
the
release/v1.6.72
branch
from
October 19, 2026 06:19
e8349a1 to
a8d8c9c
Compare
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.
Summary
Searchable::addSearchableColumns([...])(static, per model class) merges extra columns intogetSearchableColumns()andHasApiModelBehavior::searcheableFields(). Extensions can make their own data findable through a core or Fleet-Ops model's search without editing the model;relation.columndot notation works as before, and the relation may be one added with Eloquent'sresolveRelationUsing().Motivating use: an extension that stores companion records for orders (reference numbers, related contact names, custom field values) and wants them matched by the standard Fleet-Ops order search.
Test plan
getSearchableColumns()returns the model's own columns).addSearchableColumns()de-duplicates, drops non-strings, and is per model class (unit test).Order::addSearchableColumns(['companion.reference_number'])with aresolveRelationUsingrelation →Order::search('abc')adds thewhereHasclause.