Silent 6 年之前
父节点
当前提交
0618815931
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      app/Http/Controllers/Admin/AdminUserController.php

+ 4 - 1
app/Http/Controllers/Admin/AdminUserController.php

xqd
@@ -68,7 +68,10 @@ class AdminUserController extends Controller
             return back()->withErrors($validator)->withInput();
         }
 
-        $res = $this->model->create($request->input('data'));
+        $data = $request->input('data');
+        $data['password'] = bcrypt($data['password']);
+
+        $res = $this->model->create($data);
 
         if(!$res) {
             return $this->showWarning('数据库保存失败!');