diff --git a/database/seeds/UserTableSeeder.php b/database/seeds/UserTableSeeder.php index 00a081cb54..1fe962276c 100644 --- a/database/seeds/UserTableSeeder.php +++ b/database/seeds/UserTableSeeder.php @@ -7,6 +7,9 @@ use App\Models\Company; use App\Models\Affiliate; use App\Models\Country; use App\Models\InvoiceDesign; +use App\Models\Client; +use App\Models\Contact; +use App\Models\Product; use Faker\Factory; class UserTableSeeder extends Seeder @@ -41,7 +44,9 @@ class UserTableSeeder extends Seeder 'company_id' => $company->id, ]); - User::create([ + $user = User::create([ + 'first_name' => $faker->firstName, + 'last_name' => $faker->lastName, 'email' => TEST_USERNAME, 'username' => TEST_USERNAME, 'account_id' => $account->id, @@ -52,6 +57,36 @@ class UserTableSeeder extends Seeder 'notify_paid' => false, ]); + $client = Client::create([ + 'user_id' => $user->id, + 'account_id' => $account->id, + 'public_id' => 1, + 'name' => $faker->name, + 'address1' => $faker->streetAddress, + 'address2' => $faker->secondaryAddress, + 'city' => $faker->city, + 'state' => $faker->state, + 'postal_code' => $faker->postcode, + 'country_id' => Country::all()->random()->id, + ]); + + Contact::create([ + 'user_id' => $user->id, + 'account_id' => $account->id, + 'client_id' => $client->id, + 'public_id' => 1, + 'email' => TEST_USERNAME, + ]); + + Product::create([ + 'user_id' => $user->id, + 'account_id' => $account->id, + 'public_id' => 1, + 'product_key' => 'ITEM', + 'notes' => 'Something nice...', + 'cost' => 10, + ]); + Affiliate::create([ 'affiliate_key' => SELF_HOST_AFFILIATE_KEY ]);