get()->toArray(); } /** * @Desc 验证指定字段指定值是否存在 * @Author Gorden * @Date 2024/3/22 14:52 * * @param $category * @param $field * @param $value * @return bool */ public static function checkExist($category, $field, $value) { return self::where('dept_category', $category) ->where($field, $value) ->exists(); } public function premises(){ return $this->hasOne(self::class,'dept_id','dept_super_id'); } }