In your view where you wanna add search feild do like this:
<form action="/search" method="get">
{{ csrf_field() }}
<input name="search_text" type="text"/>
<input type="submit"/>
</form>
Make a route:
Route::get('/search','UserController@search');
Make your contoller as UserController
public function search()
{
$query=request('search_text');
$users = User::where('name', 'LIKE', '%' . $query . '%')->paginate(10);;
return view('searchresult',compact('users'));
}
Finally make anther view to display the result. as searchresult.blade.php
@foreach($users as $user)
{{$user->name}}
@endforeach
{{ $users->links() }}
Hope you can use it. it cant be as simple as this