Request gets overridden with other data – Jquery ajax
I'm trying to get data for autocomplete using laravel. Controller: public function collection_search(Request $request) { $term = $request->search; $serveurapObj = new Serveurap(); $result = $serveurapObj->collectionAutocomplete(); return response()->json($result); } Model: public function collectionAutocomplete($term) { $where= ['m.supprime'=>'0', 's.supprime'=>'0']; return DB::table('serveuraps AS s')…