Skip to content

Instantly share code, notes, and snippets.

@clubeagn
Last active September 26, 2018 14:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clubeagn/fb7e3faac905392fdf20a2ee9f558baa to your computer and use it in GitHub Desktop.
Save clubeagn/fb7e3faac905392fdf20a2ee9f558baa to your computer and use it in GitHub Desktop.
Typeahead JSON_Result
public function AutocompleteJson(Request $request) {
$data = XXXXX::select("xxxx as xxxx")
->where("xxx","LIKE","%{$request->input('query')}%")
->get();
return response()->json($data);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment