Files
orico-official-website/app/index/model/ProductParamsModel.php
jsasg 96ee2dda93 feat: 产品
refactor: 产品详情页seo
2025-04-27 16:46:05 +08:00

24 lines
490 B
PHP

<?php
declare (strict_types = 1);
namespace app\index\model;
use app\common\model\ProductParamsBaseModel;
/**
* 产品参数模型
* @mixin \think\Model
*/
class ProductParamsModel extends ProductParamsBaseModel
{
// 所属产品范围查询
public function scopeByProductId($query, $product)
{
if (is_array($product)) {
$query->whereIn('product_id', $product);
return;
}
$query->where('product_id', '=', $product);
}
}