validate 分离 controller

This commit is contained in:
yanwnewu
2018-11-30 09:56:27 +08:00
parent e957f9f474
commit 430e466e12
9 changed files with 74 additions and 75 deletions

View File

@@ -34,6 +34,7 @@ class User extends Base
if ($request->isPost()) {
$data = $request->post();
$data['password'] = generatePassword($data['password']);
if ($userId = $userModel->store($data)) {
// 分配角色
$this->giveRoles($userModel, $userId, $data);