Skip to content
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

Feature/relation search nested fields #2066

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mvehar-preskok
Copy link
Contributor

Proposed Changes

Add option to define nested relations/columns when defining searchColumns on Relation field.

Updated code checks if passed columns contain dot, which indicates nested relationship (e.g. Book has user relation, therefore we can now search for Books that have related users with name, email etc.)

 Relation::make('test')->title('Test')
                ->fromModel(Book::class, 'title')
                ->searchColumns('title', 'user.name', 'user.email')

@mvehar-preskok mvehar-preskok force-pushed the feature/relation-search-nested-fields branch from 66b1fe0 to d8decda Compare January 15, 2022 23:17
@mvehar-preskok mvehar-preskok force-pushed the feature/relation-search-nested-fields branch from f548e5f to d205618 Compare January 15, 2022 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant