0

I try to get the result of search queries with a where clause in the query using TNTSearch, but it doesn't work. The query didn't get the where clause.

Controller

<?php

public function getLigues(Request $request)
{
    if ($request->has('recherche')) {
        $ligues = Structure::search($request->recherche)->where('type_structure_id', '2')->get();
    } else {
        $ligues = Structure::where('type_structure_id', 2)->paginate(1);
    }

    return view('structure/ligues', compact('ligues'));
}

Does anyone have any ideas on how to get the filter query?

Karl Hill
  • 12,937
  • 5
  • 58
  • 95
Mathieu Mourareau
  • 1,140
  • 2
  • 23
  • 47

1 Answers1

0

Please go through this issue #59 on official TNT Search Repository.

See contributors comment on same issue.

Where() clause yet does not support!

There are other workarounds to achieve this testcase, for that check issues on repository.

Vaibhavraj Roham
  • 1,138
  • 11
  • 26