From a1d3dbe083d24cc4dda7d09cb8a4fb4655e210cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=2E=20Nagy=20Gerg=C5=91?= Date: Sun, 7 Jan 2024 23:53:49 +0100 Subject: [PATCH] wip --- database/factories/AddressFactory.php | 2 +- src/Events/OrderStatusChanged.php | 24 ++++++++++++++++++++++++ src/Models/Order.php | 2 +- 3 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 src/Events/OrderStatusChanged.php diff --git a/database/factories/AddressFactory.php b/database/factories/AddressFactory.php index 74b87569..5b09a384 100644 --- a/database/factories/AddressFactory.php +++ b/database/factories/AddressFactory.php @@ -33,7 +33,7 @@ public function definition(): array 'phone' => $this->faker->phoneNumber(), 'postcode' => $this->faker->postcode(), 'state' => $this->faker->state(), - 'tax_id' => Str::random() + 'tax_id' => Str::random(), ]; } } diff --git a/src/Events/OrderStatusChanged.php b/src/Events/OrderStatusChanged.php new file mode 100644 index 00000000..d36ccd88 --- /dev/null +++ b/src/Events/OrderStatusChanged.php @@ -0,0 +1,24 @@ +order = $order; + } +} diff --git a/src/Models/Order.php b/src/Models/Order.php index a32c3dae..675b97dd 100644 --- a/src/Models/Order.php +++ b/src/Models/Order.php @@ -72,7 +72,7 @@ class Order extends Model implements Contract protected $attributes = [ 'currency' => null, 'discount' => 0, - 'status' => self::PENDING, + 'status' => self::ON_HOLD, ]; /**