<?php declare (strict_types = 1); namespace app\model; use think\Model; /** * @mixin \think\Model */ class Supplier extends Base { protected $globalScope=['is_del']; public function scopeIsDel($query){ $query->where('is_del',0); } }