fix homepage
This commit is contained in:
@@ -18,7 +18,7 @@ class ContentController extends Controller
|
||||
$data = [];
|
||||
$data['cats'] = GoodCat::orderby('cat_index', 'asc')->get();
|
||||
$data['stargoods'] = GoodInfo::where('baned', '0')->where('stared', '1')->orderby('id', 'asc')->limit(5)->get();
|
||||
$data['newgoods'] = GoodInfo::where('baned', '0')->orderby('id', 'dsc')->limit(8)->get();
|
||||
$data['newgoods'] = GoodInfo::where('baned', '0')->where('count', '>', 0)->orderby('id', 'dsc')->limit(8)->get();
|
||||
$data['cats'] = GoodCat::orderby('cat_index', 'asc')->get();
|
||||
foreach($data['cats'] as $cat){
|
||||
$data['catgoods'][$cat->cat_name] = GoodInfo::where('cat_id', $cat->id)->where('baned', '0')->inRandomOrder()->limit(4)->get();
|
||||
|
||||
Reference in New Issue
Block a user