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('数据库保存失败!');