'客户意向类型', 2 => '客户来源类型', 3 => '客户类型', 4 => '客户电话类型', 5 => '进展阶段类型', 6 => '客户状态类型', 7 => '决策关系类型', 8 => '客户分级', 9 => '状态类型', 10 => '车型', 11 => '订单类型', 12 => '成交类型', 13 => '合同状态', 14 => '合同类型', 15 => '付款方式', 16 => '发货状态', 17 => '物流公司', 18 => '安装方式', 19 => '紧急程度', 20 => '产品单位', 21 => '跟进方式', 22 => '产品价格' ]; public static $user = []; public static $search = []; public static $is_search = false; public function __construct(array $attributes = []) { if(! empty($attributes['userData'])) { self::$user = $attributes['userData']; self::$search = $attributes['search'] ?? []; self::$is_search = true; } parent::__construct($attributes); } protected static function boot(){ parent::boot(); if(self::$is_search){ static::addGlobalScope(new TopDepartmentScope(self::$user, self::$search)); } } }