Yii2 framework backup
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

28 lines
788 B

<?php
use yii\helpers\Security;
return [
'username' => 'userName',
'auth_key' => function ($fixture, $faker, $index) {
$fixture['auth_key'] = Security::generateRandomKey();
return $fixture;
},
'password_hash' => function ($fixture, $faker, $index) {
$fixture['password_hash'] = Security::generatePasswordHash('password_' . $index);
return $fixture;
},
'password_reset_token' => function ($fixture, $faker, $index) {
$fixture['password_reset_token'] = Security::generateRandomKey() . '_' . time();
return $fixture;
},
'created_at' => function ($fixture, $faker, $index) {
$fixture['created_at'] = time();
return $fixture;
},
'updated_at' => function ($fixture, $faker, $index) {
$fixture['updated_at'] = time();
return $fixture;
},
'email' => 'email',
];