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
PHTML

3 months ago
<?php
namespace Database\Seeders;
3 months ago
use App\Models\Contact;
use App\Models\Customer;
use App\Models\PackingSlip;
use App\Models\ShippingEntry;
3 months ago
use App\Models\User;
3 months ago
3 months ago
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
3 months ago
use Database\Factories\ShippingEntryFactory;
use http\Client;
3 months ago
use Illuminate\Database\Seeder;
class DatabaseSeeder extends Seeder
{
/**
* Seed the application's database.
*/
public function run(): void
{
3 months ago
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();
3 months ago
User::factory()->create([
'name' => 'Test User',
'email' => 'test@example.com',
]);
}
}