Skip to content

Commit

Permalink
fixed Seeder
Browse files Browse the repository at this point in the history
  • Loading branch information
tobias-kuendig committed Jul 9, 2024
1 parent d47c69d commit a173d34
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions updates/seeders/tables/CustomerTableSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,22 @@ public function run(bool $useDemo = false)
if (!$useDemo && config('app.env') != 'testing') {
return;
}

config()->set('rainlab.user::minPasswordLength', 8);

$this->createUser(
'[email protected]',
trans('offline.mall::demo.customers.normal'),
);

$this->createUser(
'[email protected]',
'[email protected]',
trans('offline.mall::demo.customers.gold'),
CustomerGroup::where('code', 'gold')->first()->id
);

$this->createUser(
'[email protected]',
'[email protected]',
trans('offline.mall::demo.customers.diamond'),
CustomerGroup::where('code', 'diamond')->first()->id
);
Expand All @@ -60,9 +60,8 @@ protected function createUser(string $email, string $name, ?int $customerGroupId
], [
'password' => '12345678',
'password_confirmation' => '12345678',
'name' => $firstname,
'surname' => $lastname,
'is_activated' => true,
'first_name' => $firstname,
'last_name' => $lastname,
]);
$user->offline_mall_customer_group_id = $customerGroupId;
$user->save();
Expand Down

0 comments on commit a173d34

Please sign in to comment.