Skip to content
Discussion options

You must be logged in to vote

Update

I remember a similar case a year ago. If I remember correctly the issue is that the keys are not taken in consideration for the filtering. As a quick test you can do the following:

protected function fetchContacts()
{
    if (request()->get('keys')) {
        return $this->fetch([
            'model' => \App\Models\Contact::class,
            'searchable_attributes' => ['first_name', 'last_name'],
        ]);
    } else {
        // your current logic
        return $this->fetch([
            'model' => \App\Models\Contact::class,
            'query' => function ($model) {
                return $model->with('organisation')
                    ->selectRaw("contacts.id, CONCAT(organ…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jcastroa87
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants