コード例 #1
0
 /**
  * Shop home.
  *
  *
  */
 public function index()
 {
     $products = Product::with(['translations', 'images', 'images.translations'])->take(15)->get();
     $latest = $this->section($products, 4);
     $top = $this->section($products, 3);
     $bestsellers = $this->section($products, 3);
     $sales = $this->section($products, 3);
     $featured = $products;
     $tweets = latest_tweets_about(4);
     return $this->theme->render('shop.store', ['latest' => $latest, 'featured' => $featured, 'sales' => $sales, 'bestsellers' => $bestsellers, 'top' => $top, 'tweets' => $tweets]);
 }
コード例 #2
0
 /**
  * @return \Illuminate\Contracts\View\View
  */
 public function storeHome()
 {
     $tweets = latest_tweets_about(3);
     return $this->theme->render('home.index', ['tweets' => $tweets]);
 }