$data['email'], 'password' => bcrypt($data['password']), ] ); } /** * Get a validator for an incoming registration request. * * @param array $data * * @return \Illuminate\Contracts\Validation\Validator */ public function validator(array $data) { return Validator::make( $data, [ 'email' => 'required|email|max:255|unique:users', 'password' => 'required|confirmed|min:6', ] ); } }