orchidsoftware / orchidsoftware/platform

Configure Relation search query

Open
#1,388 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
4.8k
Forks
662
Avg merge
1d 9h
Merged PRs (30d)
7

Description

https://github.com/orchidsoftware/platform/blob/8b68fcb2571a302135f21f3a987434d8959f804e/src/Platform/Http/Controllers/Systems/RelationController.php#L85

It would be nice to have a bit more flexibility on this query.
in my case I would like to use ILIKE (Postgres)
it's possible to use scope but the $search parameter is not passed to the scope.

maybe we can add something like filterWithScope on the Relation field and call it with

$model = $model->{$filterScope['name']}(...array_merge($filterScope['parameters'] ?? [], $search));

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/Platform/Http/Controllers/Systems/RelationController.php around line 85 and trace how Relation fields apply filter scopes. Check how the $search parameter reaches the scope and define the smallest configurable API that supports the reported PostgreSQL ILIKE use case. Done means relation searches can pass the search value to a configured scope without breaking existing filtering.

Written by the indexing model from the issue text.

Assessment

Tech stack
laravel, php, postgresql
Domain
backend, databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.