Start working on sorting products by different columns.

This commit is contained in:
Krzysztof Płaczek committed 2025-01-27 12:10:15 +01:00
1 parent a26ad401df
commit 9b6bcd22be
5 files changed
+25 -8

No files matched your search

-1
View File
@@ -13,7 +13,6 @@ final class SearchController extends BaseController
public function __invoke(Request $request): Response
{
$search = $request->query->get('search');
//dd();
$products = Product::with('price')
->orWhere([['name', 'like', "%$search%"]])
->orWhere([['subTitle', 'like', "%$search%"]])->get();