dealhub/routes/api/deals.php
2026-01-23 09:45:07 +05:30

16 lines
330 B
PHP

<?php
use App\Http\Resources\DealResource;
use App\Models\Deal;
use App\Queries\ExplorePageDealsQuery;
Route::get('/deals/{deal}', function (Deal $deal) {
sleep(2);
return new DealResource(
(new ExplorePageDealsQuery)
->builder()
->where('id', $deal->id)
->first()
);
});