update carousel

This commit is contained in:
franknstayn
2022-02-19 20:52:12 +08:00
parent b31007ad96
commit b7e22f4821
3 changed files with 96 additions and 17 deletions

View File

@@ -167,12 +167,15 @@ class TeamStoreController extends Controller
$stores_array = $m->selectTeamstoreFilter($field, $sort_value);
}
$getCarousel = $m->getCarousel();
// var_dump($getCarousel);
$featured_products = $m->selectFeaturedProducts();
return view('merchbay.index')
->with('stores_array', $stores_array)
->with('keyword', $q)
->with('filter', $sort)
->with('carousel_images', $getCarousel)
->with('featured_products', $featured_products);
}

View File

@@ -277,6 +277,12 @@ class TeamStoreModel extends Model
FROM payment_details AS pd
INNER JOIN orders AS o ON pd.CartKey = o.CartKey
WHERE pd.UserId = $userid AND o.VoucherId = $voucherid");
return $i;
return $i;
}
function getCarousel()
{
$i = DB::select("SELECT * FROM teamstores WHERE IsActive = 'true' ORDER BY RAND() LIMIT 10");
return $i;
}
}