]> _ Git - pmi.git/commitdiff
fix #3008 @0:05
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 12 Sep 2019 13:25:48 +0000 (15:25 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 12 Sep 2019 13:25:48 +0000 (15:25 +0200)
app/Http/Controllers/ProductController.php

index ffdd06cf29849c4b7f5861415d50d3e6a0647f94..ab6baca1e8c0982166bb390aa0734b15a95d8c48 100644 (file)
@@ -22,9 +22,10 @@ class ProductController extends CubistFrontController
         $this->data['page'] = $this->data['product_type'] = $productType->getPageData();
 
         $products = Product::with('media') // Eager load media to avoid N+1 query problem
-            ->where('product_type', $id)
+        ->where('product_type', $id)
             ->where('online', 1)
             ->where('public', 1)
+            ->orderBy('reference')
             ->get();
 
         $this->data['products'] = [];