title = $product->name; $seoDatum->description = $product->description; return view('front.product', compact('product', 'gamme', 'seoDatum')); } public function search(Request $request) { $filter = $request->query('filter'); if (!empty($filter)) { $products = Product::where('is_published', 1) ->where('name', 'like', '%' . $filter . '%') ->get(); } else { $products = Product::where('is_published', 1) ->get(); } $search_title = 'Recherche : ' . $filter; return view('front.search', compact('products', 'search_title', 'filter')); } }