From 2af917ace47a6cfcc9d5c9b4d734242a7c566090 Mon Sep 17 00:00:00 2001 From: James Brooks Date: Mon, 1 Jun 2015 22:42:49 +0100 Subject: [PATCH] Added a User factory --- database/factories/ModelFactory.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 database/factories/ModelFactory.php diff --git a/database/factories/ModelFactory.php b/database/factories/ModelFactory.php new file mode 100644 index 00000000..e9f90d96 --- /dev/null +++ b/database/factories/ModelFactory.php @@ -0,0 +1,22 @@ + + * + * 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, + ]; +});