country wip
This commit is contained in:
1 parent
7396b40114
commit
97fa1202f0
21 files changed
+757
-3
No files matched your search
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Utilities;
|
||||
|
||||
use Exception;
|
||||
use Illuminate\Http\Client\PendingRequest;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
|
||||
class Guzzle
|
||||
{
|
||||
public static function load($url, $debug = 0)
|
||||
{
|
||||
BetsapiCounter::count($debug);
|
||||
|
||||
if ($debug) {
|
||||
Notice::note($url, 'g');
|
||||
}
|
||||
|
||||
$data = Http::retry(3, 2, function (Exception $exception, PendingRequest $request) {
|
||||
return $exception instanceof ConnectionException;
|
||||
})->get($url);
|
||||
|
||||
return json_decode($data, true);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user