dijkr / Copia

Laravel-project with CMS
0 stars 0 forks source link

Display message when category is loaded, but not has products #21

Open dijkr opened 1 year ago

dijkr commented 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];
        });
dijkr commented 1 year ago

To be continued.