ReInquiryConfig.php 782 字节
<?php

namespace App\Models\Inquiry;


use App\Models\Base;
use Illuminate\Support\Facades\Cache;


/**
 * Class ReInquiryConfig
 * @package App\Models\Inquiry
 * @author zbj
 * @date 2025/2/12
 */
class ReInquiryConfig extends Base
{

    //设置关联表名
    protected $table = 'gl_re_inquiry_config';


    public static function getDefaultConfigCache(){
        $cache_key = 'ReInquiryDefaultConfigCache';
        $data = Cache::get($cache_key);
        if(!$data){
            $data = self::pluck('content', 'key');
            if($data){
                Cache::put($cache_key, $data);
            }
        }
        return $data;
    }

    public static function delCache(){
        $cache_key = 'ReInquiryDefaultConfigCache';
        Cache::forget($cache_key);
    }
}