<?php

namespace App\Api\Controllers;

use App\Http\Controllers\BaseApiController;
use App\Models\DoctorModel;
use App\Models\PharmacyModel;
use App\Models\User;
use App\Services\SmsService;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;
use Overtrue\EasySms\EasySms;

class SiteConfigController extends BaseApiController
{

    public function test(){
        $site_config = admin_setting_array('site_config');
        Log::info('测试', $site_config);
        $data = [
            'diagnosis_limit' => $site_config['diagnosis_limit'],
            'drug_choose_limit' => $site_config['drug_choose_limit'],
        ];
        return $this->success($data);    
    }

    public function config(Request $request)
    {
        $site_config = admin_setting_array('site_config');
        # Log::info('测试', $site_config);
        $data = [
            'diagnosis_limit' => $site_config['diagnosis_limit'],
            'drug_choose_limit' => $site_config['drug_choose_limit'],
        ];
        return $this->success($data);    
    }
}