コード例 #1
0
ファイル: IndexController.php プロジェクト: rmvl/mebeli-magaz
 public function index(Slider $slider, Blog $blog, Product $shop, Section $section)
 {
     $slides = $slider->getActive();
     $posts = $blog->getActive();
     $products = $shop->getPopular();
     //        dd($products);
     $sections = $section->getSection();
     //        var_dump(\Session::get('product8'));
     return view('pages.index', ['slides' => $slides, 'posts' => $posts, 'products' => $products, 'sections' => $sections]);
 }
コード例 #2
0
ファイル: ShopController.php プロジェクト: rmvl/mebeli-magaz
 public function getProduct($slug, Product $product, Section $section)
 {
     $oneProduct = $product->getProduct($slug);
     //        dd($oneProduct);
     $payment = $oneProduct->payment_system;
     $images = $oneProduct->galleries;
     //        dd($images);
     $sections = $section->getSection();
     if ($payment === 0) {
         return view('pages.shop.productWithPayment', ['product' => $oneProduct, 'images' => $images, 'sections' => $sections]);
     }
     return view('pages.shop.product', ['product' => $oneProduct, 'images' => $images, 'sections' => $sections]);
 }