Skip to content

Instantly share code, notes, and snippets.

@duikb00t
Created March 28, 2014 11:11
Show Gist options
  • Select an option

  • Save duikb00t/9830366 to your computer and use it in GitHub Desktop.

Select an option

Save duikb00t/9830366 to your computer and use it in GitHub Desktop.
ajaxerr
// This returns me all the users in the table...
$users = User::all();
// But I would like to search on a field in that users table:
$users = User::all()->where('first_name','like','%'.$query.'%')->toArray();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment