这是我的AuthController:
protected function validator(array $data)
{
return Validator::make($data, [
'name' => 'required|max:255',
'email' => 'email|max:255|unique:users',
'phone' => 'size:11',
'password' => 'required|confirmed|min:6',
]);
}
/**
* Create a new user instance after a valid registration.
*
* @param array $data
* @return User
*/
protected function create(array $data)
{
return User::create([
'name' => $data['name'],
'email' => $data['email'],
'phone' => $data['phone'],
'password' => bcrypt($data['password']),
]);
}
现在出现两个问题:1.新建用户的phone没有保存,我已经检查过Model,没有问题。2.用新建的用户登陆,提示需要Email,但是我验证没要求Email啊。