GeoPlatform.php 893 字节
<?php
/**
 * @remark :
 * @name   :GeoPlatform.php
 * @author :lyh
 * @method :post
 * @time   :2025/7/3 11:16
 */

namespace App\Models\Geo;

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

/**
 * @remark :geo设置平台类型
 * @name   :GeoPlatform
 * @author :lyh
 * @method :post
 * @time   :2025/7/3 11:16
 */
class GeoPlatform extends Base
{
    protected $table = 'gl_geo_platform';

    const STATUS_ON = 1;

    /**
     * @remark :获取平台列表
     * @name   :getList
     * @author :lyh
     * @method :post
     * @time   :2025/7/3 11:18
     */
    public function getList(){
//        $data = Cache::get('geo_platform');
//        if(empty($data)){
            $data = $this->list(['status'=>$this::STATUS_ON],'sort',['name','en_name','icon','sort'],'desc');
            Cache::put('geo_platform',$data,'12 * 3600');
//        }
        return $data;
    }
}