Laravel 5.3 search without Scout?

There I realized how he paid for based on Algolia cloud service, please tell me how to do a search without him?
For example here is the search form:
<form action="/product/search" method="post">
 {{ csrf_field() }}
 <input type="text" name="search_inp">
 <input type="submit">

Route::post( 'products/search', 'ProductController@search' );

public function search(Request $request){
 return $reques->search_inp;

Or what would you do?
July 2nd 19 at 18:22
2 answers
July 2nd 19 at 18:24
For small projects use Eloquence Searchable, you don't need the scout.
July 2nd 19 at 18:26
Algalia is one of the drivers. First read about search engine like elasticsearch. And then you understand everything.
I messed with the system-yourself Schaub solve this kind of
Route::post( 'products/search', 'ProductController@search' );

public function search(Request $request){
$search_data = $request->input('searcher');
if (isset($search_data) && !empty($search_data) )
$products = DB::table('products');
$results = $products->where('product_name', 'LIKE', '%'. $search_data .'%')
->orWhere('product_id', 'LIKE', '%'. $search_data .'%')
->orWhere('description', 'LIKE', '%'. $search_data .'%')
return view('products/search')->with('results', $results);

@foreach($results as $result)
{{ $result->product_name }}
No products matched!

Please tell me what is the advantage of Scout or Elastic in front of a makeshift? When they should apply, and why? For example if the project is small, etc. - jaycee commented on July 2nd 19 at 18:29
: start then at least match - Melody_Windler commented on July 2nd 19 at 18:32
: thank you - jaycee commented on July 2nd 19 at 18:35

Find more questions by tags PHPLaravel