Added a User factory
This commit is contained in:
22
database/factories/ModelFactory.php
Normal file
22
database/factories/ModelFactory.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Cachet.
|
||||
*
|
||||
* (c) Cachet HQ <support@cachethq.io>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
$factory->define('CachetHQ\Cachet\Models\User', function ($faker) {
|
||||
return [
|
||||
'username' => $faker->userName,
|
||||
'email' => $faker->email,
|
||||
'password' => str_random(10),
|
||||
'remember_token' => str_random(10),
|
||||
'api_key' => str_random(20),
|
||||
'active' => true,
|
||||
'level' => 1,
|
||||
];
|
||||
});
|
||||
Reference in New Issue
Block a user