Skip to content

Commit

Permalink
fixed password when create customer
Browse files Browse the repository at this point in the history
  • Loading branch information
Edward Yang committed Dec 18, 2024
1 parent 8be7afa commit 2e62aee
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions innopacks/common/src/Repositories/CustomerRepo.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
use InnoShop\Common\Models\Customer;
use Throwable;

use function Laravel\Prompts\password;

class CustomerRepo extends BaseRepo
{
/**
Expand Down Expand Up @@ -100,6 +102,9 @@ public function builder(array $filters = []): Builder
public function create($data): Customer
{
$data = $this->handleData($data);
if (! isset($data['password'])) {
$data['password'] = '';
}
$item = new Customer($data);
$item->saveOrFail();

Expand Down

0 comments on commit 2e62aee

Please sign in to comment.