Skip to content

Instantly share code, notes, and snippets.

Avatar

Fausto Ferla oncelot

  • Trapani
View GitHub Profile
@imranismail
imranismail / autocomplete.php
Last active Dec 23, 2021
Laravel And JqueryUI's Autocomplete Plugin
View autocomplete.php
//SearchController.php
public function autocomplete(){
$term = Input::get('term');
$results = array();
$queries = DB::table('users')
->where('first_name', 'LIKE', '%'.$term.'%')
->orWhere('last_name', 'LIKE', '%'.$term.'%')
->take(5)->get();