diff --git a/src/Widgets/OrdersCount.php b/src/Widgets/OrdersCount.php index 6e3ee944..791138ca 100644 --- a/src/Widgets/OrdersCount.php +++ b/src/Widgets/OrdersCount.php @@ -2,7 +2,9 @@ namespace Cone\Bazar\Widgets; +use App\Models\Order; use Cone\Root\Widgets\Value; +use Illuminate\Database\Eloquent\Builder; class OrdersCount extends Value { @@ -10,4 +12,12 @@ class OrdersCount extends Value * The widget icon. */ protected ?string $icon = 'archive'; + + /** + * Create a new Eloquent query. + */ + public function query(): Builder + { + return Order::query()->status(Order::FULFILLED); + } }