Exemplo n.º 1
0
 public function info_game($id)
 {
     $games = new GiantBombApi();
     $gameInfo = $games->getAllGameInfoById($id);
     $gameDesc = preg_replace("/<img[^>]+\\>/i", "", str_replace('href="', 'target="_blank" href="http://giantbomb.com', $gameInfo['description']));
     //
     return view('pages.info_game', compact('tweetV', 'tweetR', 'tweetJ', 'gameInfo', 'gameDesc'));
 }
Exemplo n.º 2
0
 public function test()
 {
     $games = new GiantBombApi();
     $gamesArray = $games->getAllGameInfoById(46090);
     $tweetV = \App\Tweet::getStatusVlambeer();
     $tweetR = \App\Tweet::getStatusRami();
     $tweetJ = \App\Tweet::getStatusJan();
     return view('pages.giantbomb_api', compact('gamesArray', 'tweetV', 'tweetR', 'tweetJ'));
 }
 public function category($cat)
 {
     if ($cat == 'sales') {
         $productArray = \App\Product::where('sale', 1)->get();
     } else {
         $productArray = \App\Product::where('category', $cat)->get();
     }
     $games = new GiantBombApi();
     $gameInfo = $games->getAllGameInfoById(34402);
     $productimg = Product::query()->orderByRaw("RAND()")->limit(5)->get();
     $product_sale_img = Product::query()->where('sale', 1)->get();
     return view('shop.index', compact('gameInfo', 'productArray', 'productimg', 'product_sale_img'));
 }