fix some issu

This commit is contained in:
2026-08-26 21:47:09 +03:30
parent 74cc50149f
commit 40b185187c
14 changed files with 179 additions and 72 deletions
+6 -1
View File
@@ -2,6 +2,7 @@
namespace App\Services;
use App\Http\Controllers\Controller;
use App\Models\Product;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Cache;
@@ -179,7 +180,10 @@ class ProductPriceSyncService
$CP = null;
try {
$cooper = Http::timeout(8)->get('https://www.livedata.ir/main/static/p.json', [])->json();
$cooper = Http::timeout(8)
->withOptions(Controller::httpClientOptions([], 8.0))
->get('https://www.livedata.ir/main/static/p.json', [])
->json();
if (isset($cooper['s_301006'], $cooper['s_200103'])) {
$CP = (($cooper['s_301006'] / 1000000) * $cooper['s_200103']) * 10;
}
@@ -238,6 +242,7 @@ class ProductPriceSyncService
try {
$RPrices = Http::timeout(8)
->withOptions(Controller::httpClientOptions([], 8.0))
->get('http://212.23.201.173:8381/price_list', [])
->json();
} catch (\Throwable $e) {