andersao / andersao/l5-repository

Multiple search using repository

オープン
#559 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
PHP
スター
4.2k
フォーク
880
PR マージ指標
30日以内にマージされた PR はありません

説明

Hi,
I could not search the exact result, please see below code:

TaskRepository.php
protected $fieldSearchable = [
'client.country.name' => 'LIKE',
'client.name' => 'LIKE',
'status' => 'LIKE',
'title' => 'LIKE',
'reference_number' => '='
];

my request is :
http://api.dev.com:91/v3/tasks?search=development tasks&client.country.name:UK;status:active&limit=10&page=1&orderBy=updated_at&sortedBy=desc

I am searching all "development tasks" in all search fields then a user can filter only country name as "UK" and status as "Active".

I tried to use the "**searchFields**" feature and also **searchJoin**=and still I am getting a wrong result.
Can you please help?
Thank you in advance.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。