Open dijkr opened 1 year ago
Whenever the database doesn't have products yet, for a specific category. The view need to show a message to clearify this to users. Also, a empty block for the subcategory is shown with an empty results.
$searchResults = $products->groupBy('Subcategory')->mapWithKeys(function ($products, $key) { $subcategory = json_decode($key, true); $name = $subcategory['name']; return [$name => $products]; });
To be continued.
Whenever the database doesn't have products yet, for a specific category. The view need to show a message to clearify this to users. Also, a empty block for the subcategory is shown with an empty results.