You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
topnotch_website/database/seeders/DatabaseSeeder.php

64 lines
1.9 KiB
PHP

<?php
namespace Database\Seeders;
use App\Models\Contact;
use App\Models\Customer;
use App\Models\PackingSlip;
use App\Models\ShippingEntry;
use App\Models\User;
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Database\Factories\ShippingEntryFactory;
use http\Client;
use Illuminate\Database\Seeder;
class DatabaseSeeder extends Seeder
{
/**
* Seed the application's database.
*/
public function run(): void
{
Customer::factory(9)
->has(Contact::factory(5))
->has(PackingSlip::factory(30))
->has(ShippingEntry::factory(2))
->create();
Customer::factory([
'company_name' => 'Genumark',
'internal_name' => 'genumark',
'shipping_address' => '',
'billing_address' => '',
])
->has(Contact::factory([
'first_name' => 'Tammy',
'last_name' => 'Bookbinder',
'email' => 'tbookbinder@genumark.com'
]))
->has(Contact::factory([
'first_name' => 'Kathlyn',
'last_name' => 'Wood',
'email' => 'kwood@genumark.com'
]))
->has(PackingSlip::factory(20))
->has(ShippingEntry::factory([
'account_title' => 'Genumark',
'courier' => 'UPS CampusShip',
'contact' => 'https://www.ups.com/lasso/login',
'account_username' => 'GenumarkTopNotch',
'account_password' => 'TopNotch@13579',
'info_needed' => 'Put PO on box',
'notify' => 'CC Kathlyn Wood',
'notes' => 'For Save On Foods orders, see Genumark SOF'
]))
->create();
User::factory()->create([
'name' => 'Test User',
'email' => 'test@example.com',
]);
}
}