call([ PaymentTermsSeeder::class, SettingsTableSeeder::class ]); User::factory()->create([ 'name' => 'Daniel Stock', 'email' => 'daniel.stock@tooloop.de', 'password' => bcrypt('6T0az2JGO5oA'), ]); // Create customers with contacts Customer::factory(20)->create()->each(function ($customer) { // Create a primary contact for each customer Contact::factory()->create([ 'customer_id' => $customer->id, 'is_primary' => true, ]); // Create additional contacts for each customer Contact::factory(rand(1, 3))->create([ 'customer_id' => $customer->id, ]); }); // Create invoices Invoice::factory(20)->create()->each(function ($invoice) { // Create line items for each invoice LineItem::factory(rand(5, 10))->create([ 'invoice_id' => $invoice->id, ]); }); } }