php 返回h5标签格式

    $request = $request->all();
    // dd($request);
    // 当前条数
    $page = $request['page'];
    $limit = 8;
    //分页重第几页开始
    $star =($page -1)*$limit;
    //获取数据分页
    $sku = DB::table('sku')
    ->whereNull('sku.deleted_at')
    ->groupBy('sku.sku_gid')
    ->leftJoin('goods', 'goods.id', '=', 'sku.sku_gid')
    ->whereNull('goods.deleted_at')
    ->where('sku.sku_status',1)
    ->where('goods.status',1)
    ->offset($star)
    ->limit($limit)
    ->get();
    //总数
    // $num = DB::table('sku')->get()->count();
    // $sku = DB::table('sku')->paginate(8);
    $ul ='';
    foreach ($sku as $val){
    $ul .= 
    '
                            

'.$val->sku_title.'

规格:'.$val->sku_specs.'

¥'.$val->price.'

'; } return $ul;

你可能感兴趣的:(php 返回h5标签格式)