feat: 新品上市
This commit is contained in:
@@ -46,4 +46,10 @@ class ProductModel extends ProductBaseModel
|
||||
{
|
||||
$query->where('is_hot', '=', (int)$stat);
|
||||
}
|
||||
|
||||
// 新品状态范围查询
|
||||
public function scopeIsNew($query, bool $stat = true)
|
||||
{
|
||||
$query->where('is_new', '=', (int)$stat);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user