Deploy to Production (witstore.wende.it) / deploy (push) Successful in 8s
- Gutscheincodes: DB-Verwaltung (%, €-Rabatt, Mindestbestellwert, Ablauf), Eingabefeld im Checkout, Admin unter Marketing → Gutscheine - Newsletter: Double-Opt-In per E-Mail, Formular im Footer, Admin-Liste mit CSV-Export - Länderzonen-Versand: DE / DACH / EU / WORLD, Versandkosten nach Lieferland dynamisch berechnet, Coupon-Rabatt in Bestellung gespeichert - Sale-Preise: sale_price auf Produkten, durchgestrichener UVP auf Produktkarte, Sonderangebote-Sektion auf Startseite - USP-Leiste auf Startseite: Versand, Zahlung, Rückgabe, Service Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
25 lines
1.1 KiB
PHP
25 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Shop;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use App\Models\Banner;
|
|
use App\Models\Category;
|
|
use App\Models\Page;
|
|
use App\Models\Product;
|
|
|
|
class HomeController extends Controller
|
|
{
|
|
public function index()
|
|
{
|
|
$banners = Banner::where('active', true)->orderBy('sort_order')->get();
|
|
$categories = Category::whereNull('parent_id')->where('active', true)->orderBy('sort_order')->get();
|
|
$topProducts = Product::where('active', true)->where('featured', true)->with('images','variants','category')->latest()->take(8)->get();
|
|
$newProducts = Product::where('active', true)->with('images','variants','category')->latest()->take(8)->get();
|
|
$saleProducts = Product::where('active', true)->whereNotNull('sale_price')->with('images','variants','category')->latest()->take(8)->get();
|
|
$blogPosts = Page::where('type', 'blog')->where('published', true)->latest('published_at')->take(3)->get();
|
|
|
|
return view('shop.home', compact('banners', 'categories', 'topProducts', 'newProducts', 'saleProducts', 'blogPosts'));
|
|
}
|
|
}
|