refactor: susun semula struktur folder — Laravel source ke src/

This commit is contained in:
Saufi
2026-05-19 15:58:35 +08:00
parent f052251b94
commit bf53c71b45
10806 changed files with 1385379 additions and 121 deletions

View File

@@ -0,0 +1,39 @@
<?php
declare(strict_types=1);
namespace Laravel\Boost\Concerns;
use Illuminate\Http\Client\PendingRequest;
use Illuminate\Http\Client\Response;
use Illuminate\Support\Facades\Http;
trait MakesHttpRequests
{
public function client(): PendingRequest
{
$client = Http::withHeaders([
'User-Agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:140.0) Gecko/20100101 Firefox/140.0 Laravel Boost',
]);
// Disable SSL verification for local development URLs and testing
if (app()->environment(['local', 'testing']) || str_contains((string) config('boost.hosted.api_url', ''), '.test')) {
return $client->withoutVerifying();
}
return $client;
}
public function get(string $url): Response
{
return $this->client()->get($url);
}
/**
* @param array<string, mixed> $json
*/
public function json(string $url, array $json): Response
{
return $this->client()->asJson()->post($url, $json);
}
}