<?php
/*
 本代码由 口号帮 创建
 创建时间 2019-05-08 16:22:09
 技术支持 口号帮 
 严禁反编译、逆向等任何形式的侵权行为，违者将追究法律责任
*/

namespace App\Http\Controllers\Admin;use App\Http\Controllers\BaseController;use App\Models\Website;use Illuminate\Http\Request;use App\Http\Controllers\Controller;use phpDocumentor\Reflection\Types\Null_;use Illuminate\Support\Facades\Validator;class CloudConfigController extends BaseController{public function index(){$model=Website::first(['oemid','app_key','app_secret']);$oem_id=$model->oemid;$app_key=$model->app_key;$app_secret=$model->app_secret;return view('admin.cloudconfig.index',compact('oem_id','app_key','app_secret'));}public function create(){}public function store(Request $request){}public function show($id){}public function edit($id){}public function update(Request $request){$validate=Validator::make($request->all(),['oem_id'=>'required','app_key'=>'required','app_secret'=>'required',]);$P2g0=!$validate->fails();if($P2g0)goto P2gBodyx2;goto P2gNextx2;P2gBodyx2:Website::query()->update(['oemid'=>$request->get('oem_id'),'app_key'=>$request->get('app_key'),'app_secret'=>$request->get('app_secret')]);return response()->json(['code'=>200,'msg'=>'配置成功','data'=>null]);goto P2gx1;P2gNextx2:if($validate->errors()->has('oem_id'))goto P2gBodyx3;goto P2gNextx3;P2gBodyx3:return response()->json(['code'=>0,'msg'=>'请输入Oemid','data'=>null]);goto P2gx1;P2gNextx3:if($validate->errors()->has('app_key'))goto P2gBodyx4;goto P2gNextx4;P2gBodyx4:return response()->json(['code'=>0,'msg'=>'请输入App_key','data'=>null]);goto P2gx1;P2gNextx4:if($validate->errors()->has('app_secret'))goto P2gBodyx5;goto P2gNextx5;P2gBodyx5:return response()->json(['code'=>0,'msg'=>'请输入App_secret','data'=>null]);goto P2gx1;P2gNextx5:P2gx1:}public function destroy($id){}}
?>