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">
 </form>

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

Controller
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
Solution
https://github.com/jarektkaczyk/eloquence
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
Routh
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 .'%')
->get();
return view('products/search')->with('results', $results);
}
}

Vushka
@if(isset($results))
@foreach($results as $result)
{{ $result->product_name }}
@endforeach
@else
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 www.mysql.ru/docs/man/Fulltext_Search.html - 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