Implement MakerWorld collections sync every 10 minutes and Artikel Beheer staging workflow
This commit is contained in:
@@ -19,7 +19,7 @@ class ShopController extends Controller
|
||||
->get();
|
||||
|
||||
$featuredProducts = Product::with('category')
|
||||
->where('is_active', true)
|
||||
->published()
|
||||
->where('is_featured', true)
|
||||
->latest()
|
||||
->take(6)
|
||||
@@ -32,7 +32,7 @@ class ShopController extends Controller
|
||||
|
||||
public function catalog(Request $request)
|
||||
{
|
||||
$query = Product::with('category')->where('is_active', true);
|
||||
$query = Product::with('category')->published();
|
||||
|
||||
// Filter op categorie
|
||||
if ($request->filled('category')) {
|
||||
@@ -75,13 +75,13 @@ class ShopController extends Controller
|
||||
|
||||
public function show($slug)
|
||||
{
|
||||
$product = Product::with('category')->where('slug', $slug)->firstOrFail();
|
||||
$product = Product::with('category')->published()->where('slug', $slug)->firstOrFail();
|
||||
$allMaterials = Material::where('is_active', true)->get()->keyBy('code');
|
||||
$allColors = Color::where('in_stock', true)->get();
|
||||
|
||||
$relatedProducts = Product::where('id', '!=', $product->id)
|
||||
$relatedProducts = Product::published()
|
||||
->where('id', '!=', $product->id)
|
||||
->where('category_id', $product->category_id)
|
||||
->where('is_active', true)
|
||||
->take(3)
|
||||
->get();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user