示例#1
0
 public function index()
 {
     $categories = $this->category->all();
     $featured = $this->product->featured();
     $recommended = $this->product->recommended();
     return view('store.index', compact('categories', 'featured', 'recommended'));
 }
 public function index(\CodeCommerce\Category $category, \CodeCommerce\Product $product)
 {
     $categories = $category->all();
     $pFeatureds = $product->featured()->limit(3)->get();
     $pRecommends = $product->recommend()->limit(3)->get();
     return view('store.index', compact('categories', 'pFeatureds', 'pRecommends'));
 }
 public function index()
 {
     $categories = Category::all();
     $pFeatured = Product::featured()->get();
     $pRecommended = Product::recommended()->get();
     return view('store.index', compact('categories', 'pFeatured', 'pRecommended'));
 }
示例#4
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index(Category $category, Product $product)
 {
     $categories = $category->all();
     $pFeatured = $product->featured()->get();
     $pRecommended = $product->recommended()->get();
     return view('store.index', compact('categories', 'pFeatured', 'pRecommended'));
 }
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $categories = Category::all();
     $Fproducts = Product::featured()->get();
     $Rproducts = Product::recommended()->get();
     return view('store.index', compact('categories', 'Fproducts', 'Rproducts'));
 }
 public function index()
 {
     $categories = Category::all();
     $pFeatured = Product::featured()->get();
     return view('store.index', ['categories' => $categories, 'pFeatured' => $pFeatured]);
 }
 public function index()
 {
     $prodsFeatured = Product::featured()->get();
     $prodsRecommended = Product::recommended()->get();
     return view('store.index', compact('prodsFeatured', 'prodsRecommended'));
 }