Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
iamgergo committed Dec 18, 2024
1 parent 2050c71 commit c73885b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/Widgets/OrdersCount.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Cone\Bazar\Models\Order;
use Cone\Root\Widgets\Value;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Http\Request;

class OrdersCount extends Value
{
Expand All @@ -14,10 +15,12 @@ class OrdersCount extends Value
protected ?string $icon = 'archive';

/**
* Create a new Eloquent query.
* {@inheritdoc}
*/
public function query(): Builder
public function resolveQuery(Request $request): Builder
{
return Order::query()->status(Order::FULFILLED);
$this->queryResolver = fn (): Builder => Order::query()->status(Order::FULFILLED);

return parent::resolveQuery($request);
}
}

0 comments on commit c73885b

Please sign in to comment.