Skip to content

Add hasRelationPath method for relation path validation#10

Merged
kettasoft merged 1 commit intomasterfrom
feature/relation-path-check
Aug 19, 2025
Merged

Add hasRelationPath method for relation path validation#10
kettasoft merged 1 commit intomasterfrom
feature/relation-path-check

Conversation

@kettasoft
Copy link
Copy Markdown
Owner

Overview

This pull request introduces a new helper method hasRelationPath to the
Filterable core. It provides a reliable way to check if a given dot-notated
path refers to a valid relation.

Changes

  • Added hasRelationPath(string $path): bool method.
  • Supports nested relations using dot notation (e.g. user.posts.comments).
  • Handles both associative and flat relations arrays.
  • Improves overall safety when resolving relation-based filters.

@kettasoft kettasoft merged commit 973b3dd into master Aug 19, 2025
1 check passed
@kettasoft kettasoft deleted the feature/relation-path-check branch August 27, 2025 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant