I want to use Eloquent\'s active record building to build a search query, but it is going to be a LIKE search. I have found the User::find($term) or User:
User::find($term)
User:
If you do not like double quotes like me, this will work for you with single quotes:
$value = Input::get('q'); $books = Book::where('name', 'LIKE', '%' . $value . '%')->limit(25)->get(); return view('pages/search/index', compact('books'));