<?php

namespace App\Http\Controllers\Api;

use App\Http\Controllers\Controller;
use App\Models\Setting;
use App\Models\ShareConfig;
use Illuminate\Http\Request;

class SettingController extends Controller
{
    public function get()
    {
        $shareConfig = ShareConfig::orderBy('id','asc')->first()->toArray();
        $setting = Setting::orderBy('id','asc')->first()->toArray();
        $data = [
            'origin_member_price' => $shareConfig['origin_member_price'],
            'member_price' => $shareConfig['member_price'],
            'service_wechat' => $setting['service_wechat'],
            'service_qrcode' => env('APP_URL').'/uploads/'.$setting['service_qrcode'],
            'open_share' => $shareConfig['is_open'],
            'review_mode' => $setting['review_mode'],
        ];
        return out($data);
    }
}
