diff --git a/README.md b/README.md index 9522d5a..a736a92 100644 --- a/README.md +++ b/README.md @@ -178,6 +178,29 @@ First, publish the config files: Then edit the view names in `app/config/packages/zizaco/confide/config.php`. +#### Seeding + +To seed your users table you should fill also the `password_confirmation` and `confirmation_code` fields. For example: + + class UsersTableSeeder extends Seeder { + + public function run() + { + $user = new User; + $user->username = 'johndoe; + $user->email = 'johndoe@site.dev'; + $user->password = 'foo_bar_1234'; + $user->password_confirmation = 'foo_bar_1234'; + $user->confirmation_code = md5($user->username.time('U')); + + if(! $user->save()) { + Log::info('Unable to create user '.$user->username, (array)$user->errors()); + } else { + Log::info('Created user "'.$user->username.'" <'.$user->email.'>'); + } + } + } + #### Custom user validation You can implement your own validator by creating a class that implements the `UserValidatorInterface` and registering that class as *"confide.user_validator"*.