andersao / andersao/l5-repository
Multiple search using repository
- 主要語言
- 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 還沒有評估資料。