Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bvlinsky committed Sep 21, 2023
1 parent bde10a1 commit 9c16ef4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 1 addition & 2 deletions app/Events/ProductSearchValueEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@

namespace App\Events;

use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;

class ProductSearchValueEvent implements ShouldQueue
class ProductSearchValueEvent
{
use Dispatchable;
use SerializesModels;
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/OrderController.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function index(OrderIndexRequest $request): JsonResource
? $request->validated() + ['status.hidden' => 0] : $request->validated();

$query = Order::searchByCriteria($search_data)
->sort($request->input('sort'))
->sort($request->input('sort', 'created_at:desc'))
->with([
'products',
'discounts',
Expand Down
3 changes: 2 additions & 1 deletion app/Listeners/ProductSearchValueListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@

use App\Events\ProductSearchValueEvent;
use App\Services\Contracts\ProductServiceContract;
use Illuminate\Contracts\Queue\ShouldQueue;

readonly class ProductSearchValueListener
readonly class ProductSearchValueListener implements ShouldQueue
{
public function __construct(
private ProductServiceContract $productService,
Expand Down

0 comments on commit 9c16ef4

Please sign in to comment.