Changeset View
Changeset View
Standalone View
Standalone View
src/database/seeds/UserSeeder.php
Show All 20 Lines | public function run() | ||||
'namespace' => 'kolab.org', | 'namespace' => 'kolab.org', | ||||
'status' => Domain::STATUS_NEW + Domain::STATUS_ACTIVE + Domain::STATUS_CONFIRMED + Domain::STATUS_VERIFIED, | 'status' => Domain::STATUS_NEW + Domain::STATUS_ACTIVE + Domain::STATUS_CONFIRMED + Domain::STATUS_VERIFIED, | ||||
'type' => Domain::TYPE_EXTERNAL | 'type' => Domain::TYPE_EXTERNAL | ||||
] | ] | ||||
); | ); | ||||
$john = User::create( | $john = User::create( | ||||
[ | [ | ||||
'name' => "John Doe", | 'name' => 'John Doe', | ||||
'email' => 'john@kolab.org', | 'email' => 'john@kolab.org', | ||||
'password' => 'simple123', | 'password' => 'simple123', | ||||
'email_verified_at' => now() | 'email_verified_at' => now() | ||||
] | ] | ||||
); | ); | ||||
$john->setSettings( | $john->setSettings( | ||||
[ | [ | ||||
"first_name" => "John", | 'first_name' => 'John', | ||||
"last_name" => "Doe", | 'last_name' => 'Doe', | ||||
"currency" => "USD", | 'currency' => 'USD', | ||||
"country" => "US" | 'country' => 'US', | ||||
'billing_address' => "601 13th Street NW\nSuite 900 South\nWashington, DC 20005", | |||||
'external_email' => 'john.doe.external@gmail.com', | |||||
'phone' => '+1 509-248-1111', | |||||
] | ] | ||||
); | ); | ||||
$user_wallets = $john->wallets()->get(); | $user_wallets = $john->wallets()->get(); | ||||
$package_domain = \App\Package::where('title', 'domain-hosting')->first(); | $package_domain = \App\Package::where('title', 'domain-hosting')->first(); | ||||
$package_kolab = \App\Package::where('title', 'kolab')->first(); | $package_kolab = \App\Package::where('title', 'kolab')->first(); | ||||
$domain->assignPackage($package_domain, $john); | $domain->assignPackage($package_domain, $john); | ||||
$john->assignPackage($package_kolab); | $john->assignPackage($package_kolab); | ||||
$jack = User::create( | $jack = User::create( | ||||
[ | [ | ||||
'name' => "Jack Daniels", | 'name' => 'Jack Daniels', | ||||
'email' => 'jack@kolab.org', | 'email' => 'jack@kolab.org', | ||||
'password' => 'simple123', | 'password' => 'simple123', | ||||
'email_verified_at' => now() | 'email_verified_at' => now() | ||||
] | ] | ||||
); | ); | ||||
$jack->setSettings( | $jack->setSettings( | ||||
[ | [ | ||||
"first_name" => "Jack", | 'first_name' => 'Jack', | ||||
"last_name" => "Daniels", | 'last_name' => 'Daniels', | ||||
"currency" => "USD", | 'currency' => 'USD', | ||||
"country" => "US" | 'country' => 'US' | ||||
] | ] | ||||
); | ); | ||||
$john->assignPackage($package_kolab, $jack); | $john->assignPackage($package_kolab, $jack); | ||||
factory(User::class, 10)->create(); | factory(User::class, 10)->create(); | ||||
} | } | ||||
} | } |