user shop sites

This commit is contained in:
Kevin Adametz 2019-02-07 17:25:43 +01:00
parent 22a2b4710a
commit dc857e88d5
37 changed files with 2044 additions and 869 deletions

View file

@ -23,8 +23,12 @@ class SiteController extends Controller
public function index()
{
$products = ['aloe-vera-gel-99', 'aloe-vera-saft-500-ml', 'aloe-vera-lippenbalsam'];
$set_products = ['aloe-vera-cleaner-set', 'aloe-vera-koerper-set', 'aloe-vera-repair-set'];
$data = [
'user_shop' => Util::getUserShop()
'products' => Product::whereIn('slug', $products)->get(),
'set_products' => Product::whereIn('slug', $set_products)->get(),
'user_shop' => Util::getUserShop(),
];
return view('web.index', $data);
}
@ -32,6 +36,8 @@ class SiteController extends Controller
public function site($site, $subsite = false, $product_slug = false)
{
$subsite = trim($subsite, '/');
$product_slug = trim($product_slug, '/');
if($product_slug){
$category = Category::where('slug', $subsite)->where('active', true)->first();