그래서 Laravel 4에서 Ardent를 구현 중이며이 암호 확인이 일치하지 않는 이유를 해결할 수 없습니다.Laravel 4 - Ardent - 암호 확인이 일치하지 않습니다.
내 사용자 컨트롤러는 좋아에게 보이는이 :
use Illuminate\Auth\UserInterface;
use Illuminate\Auth\Reminders\RemindableInterface;
use LaravelBook\Ardent\Ardent;
class User extends Ardent implements UserInterface, RemindableInterface {
public static $rules = array(
'first_name' => 'required|min:2|max:80|alpha',
'last_name' => 'required|min:2|max:80|alpha',
'email' => 'required|between:3,64|email|unique:users',
'postal_code' => 'required|min:5|max:80',
'password' => 'required|between:4,20|confirmed',
'password_confirmation' => 'same:password',
'timezone_id' => 'required|numeric',
);
public $autoPurgeRedundantAttributes = true;
그런 다음 모델 저장소의 행동에 나는 다음과 같습니다
$user = new User(Input::all());
if($user->save()) {
// does a bunch of stuff
}
그러나 결국 '암호 확인 경고들이 지속적인 내가 할 수있는 왜 그걸 왜 분류하는 것 같니? 확인 된 옵션을 암호 필드에서 제거하면 모든 것이 잘 작동합니다. 나는 그들이 그들이 동일하다는 것을 이해하게 할 수는없는 듯하다. 아래에 예제 var_dump를 포함 시켰습니다. 테스트 한 결과 유효성 검사를 통과하지 못했습니다.
array(10) {
["_token"]=> string(40) "726lKBQgckGuLBxmJZ7Kjq4kzzXqADDqv3ZSnMOE"
["first_name"]=> string(3) "asd"
["last_name"]=> string(3) "asd"
["email"]=> string(14) "[email protected]"
["postal_code"]=> string(7) "XXX XXX"
["new_game_notification"]=> string(1) "1"
["timezone_id"]=> string(1) "5"
["password"]=> string(6) "asdasd"
["password_confirmation"]=> string(6) "asdasd"
["role"]=> string(7) "regular"
}
저장하기 전에 해싱 암호를 해싱하고 있었지만이 문제를 해결하기 위해 지금 해지했습니다.
모든 제안이나 지침/방향에 크게 감사드립니다.