<?php


namespace App\Http\Controllers\Api;


// AB面单独开关
class OtherController
{
    protected $switch = 1; # 0关 1开


    public function switch()
    {
        if ($this->switch) {
            return apiReturnSuc(true);
        }else{
            return apiReturnFail('',false);
        }
    }

    public function checkResponse(Request $request)
    {
        $code = $request->input('code');
        if (!isset($_SESSION['state']) || $state != $_SESSION['state'] || !$code) {
            return apiReturnFail(__('messages.api.other.empty_response'),false);
        }
    }
}
