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

namespace App\Http\Controllers\Admin;use App\Models\SettingManager;use Illuminate\Http\Request;use App\Http\Controllers\Controller;class SettingManagerController extends Controller{public function index(){return view('admin.manager.index');}public function data(Request $request){$res=SettingManager::paginate(10)->toArray();$P2gAC0=array();$P2gAC0['code']=0;$P2gAC0['msg']='正在请求中...';$P2gAC0['count']=$res['total'];$P2gAC0['data']=$res['data'];$data=$P2gAC0;return response()->json($data);}public function edit($id){$info=SettingManager::where('id',$id)->first();return view('admin.manager.edit',compact('info','id'));}public function update(Request $request){$data=$request->all();unset($data['_token']);SettingManager::where('id',$data['id'])->update($data);return redirect(route("admin.setting.manager"));}}
?>