Skip to content

Commit

Permalink
Code refactor
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Poyigi <[email protected]>
  • Loading branch information
sampoyigi committed Jun 19, 2024
1 parent e403ee2 commit d9b415e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Database/Factories/CustomerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public function definition(): array
'first_name' => $this->faker->firstName(),
'last_name' => $this->faker->lastName(),
'email' => $this->faker->email(),
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
'telephone' => $this->faker->phoneNumber(),
'newsletter' => $this->faker->boolean(),
'address_id' => $this->faker->numberBetween(1, 9999),
Expand Down
4 changes: 4 additions & 0 deletions src/Models/Customer.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ class Customer extends AuthUserModel
'reset_time' => 'datetime',
];

protected $attributes = [
'last_location_area' => '',
];

public static function getDropdownOptions()
{
return static::whereIsEnabled()->selectRaw('customer_id, concat(first_name, " ", last_name) as name')->dropdown('name');
Expand Down

0 comments on commit d9b415e

Please sign in to comment.