1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-22 17:31:35 +02:00
invoiceninja/database/seeds/UserTableSeeder.php

29 lines
586 B
PHP
Raw Normal View History

2015-03-16 22:45:25 +01:00
<?php
2015-08-20 17:09:04 +02:00
use App\Models\User;
use App\Models\Account;
2015-03-16 22:45:25 +01:00
class UserTableSeeder extends Seeder
{
public function run()
{
2015-08-20 17:09:04 +02:00
$this->command->info('Running UserTableSeeder');
Eloquent::unguard();
$account = Account::create([
'name' => 'Test Account',
'account_key' => str_random(16),
'timezone_id' => 1,
]);
2015-03-16 22:45:25 +01:00
2015-08-20 17:09:04 +02:00
User::create([
'email' => TEST_USERNAME,
'username' => TEST_USERNAME,
'account_id' => $account->id,
'password' => Hash::make(TEST_PASSWORD),
]);
2015-03-16 22:45:25 +01:00
}
}