I am facing a problem with my laravel app while using search functionality. Here is my code for search function
use DB;
public function search(Request $request){
$query = $request->input('query');
$products = DB::table('products')
->where('product_title','like','%'.$query.'%')
->get();
Lets imagine I have product title as "Demo Product" in my app. There is no problem if I intend to search product with keyword like de/d/mo/pro etc.Those keywords showing some result. But how can I get search query result if I search with keyword like "deemoo"/"prooductt" etc [Intend to show "Demo Product"].Please give me some suggestion if you can.Thanks in advance :)