This commit is contained in:
2026-06-14 21:09:43 +03:30
parent 6f86e8242c
commit b84b2df01a
9 changed files with 287 additions and 66 deletions
+4 -2
View File
@@ -29,8 +29,10 @@ class LivePriceTickService
| (قبل از sync محصولات تا آبشدهٔ «قیمت اپ» تازه باشد)
*/
$request = Request::create('/api/price/last', 'GET', ['force_refresh' => '1']);
$response = app(ReportController::class)->lastPrice($request);
$payload = json_decode($response->getContent(), true);
$result = app(ReportController::class)->lastPrice($request);
$payload = is_array($result)
? $result
: (json_decode($result->getContent(), true) ?: []);
if (! is_array($payload)) {
$payload = [];
}