diff --git a/Models/Product.php b/Models/Product.php index 560bab7..70b5e7e 100644 --- a/Models/Product.php +++ b/Models/Product.php @@ -104,6 +104,11 @@ public function isOnStock(): bool return $this->stock > 0; } + public function isOutOfStock(): bool + { + return !$this->isOnStock(); + } + public function onStockQuantity(): float { return (float) $this->stock;