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

namespace App\Http\Controllers\Admin;use App\Http\Requests\WebSiteRequest;use App\Models\Website;use Illuminate\Http\Request;use App\Http\Controllers\Controller;use Illuminate\Support\Facades\Redis;class WebSiteController extends Controller{public function index(Website $website){$website=$website->first();return view('admin.website.index',compact('website'));}public function update(WebSiteRequest $request,Website $website){$data=$request->all();$first=$website->find(1);if($first)goto J31Bodyx2;goto J31Nextx2;J31Bodyx2:$J310=$first->base_loan!=$data['base_loan'];if($J310)goto J31Bodyx4;goto J31Nextx4;J31Bodyx4:Redis::del('all_count:');goto J31x3;J31Nextx4:J31x3:$J310=$first->base_today_loan!=$data['base_today_loan'];if($J310)goto J31Bodyx6;goto J31Nextx6;J31Bodyx6:Redis::del('today_count:'.date('Y-m-d').':');goto J31x5;J31Nextx6:J31x5:$first->company_name=$data['company_name'];$first->phone=$data['phone'];$first->record_num=$data['record_num'];$first->base_loan=$data['base_loan'];$first->base_today_loan=$data['base_today_loan'];if($data['qrcode_weixin'])goto J31Bodyx8;goto J31Nextx8;J31Bodyx8:$first->qrcode_weixin=$data['qrcode_weixin'];goto J31x7;J31Nextx8:J31x7:if($data['keywords'])goto J31Bodyxa;goto J31Nextxa;J31Bodyxa:$first->keywords=$data['keywords'];goto J31x9;J31Nextxa:J31x9:if($data['introduce'])goto J31Bodyxc;goto J31Nextxc;J31Bodyxc:$first->introduce=$data['introduce'];goto J31xb;J31Nextxc:J31xb:$first->update();return redirect()->route('admin.website')->with('success','门户设置更新成功！');goto J31x1;J31Nextx2:$website->create($data);Redis::del('all_count:');Redis::del('today_count:'.date('Y-m-d').':');return redirect()->route('admin.website')->with('success','门户设置成功！');J31x1:}}
?>