fix areageoseeder

This commit is contained in:
mahdahar 2026-02-19 13:31:13 +07:00
parent 5bfd71e7d7
commit 2af95945a3

View File

@ -12,13 +12,7 @@ class AreaGeoSeeder extends Seeder
* API configuration for fetching zones data * API configuration for fetching zones data
* Configure in .env: AREAGEO_API_URL=https://services-summit.my.id/api/zones * Configure in .env: AREAGEO_API_URL=https://services-summit.my.id/api/zones
*/ */
protected string $apiUrl; protected string $apiUrl = 'http://services-summit.my.id/api/zones';
public function __construct()
{
parent::__construct();
$this->apiUrl = env('AREAGEO_API_URL', 'http://services-summit.my.id/api/zones');
}
// public function run() // public function run()
// { // {
@ -66,6 +60,9 @@ class AreaGeoSeeder extends Seeder
// } // }
public function run() public function run()
{ {
// Get API URL from environment or use default (HTTP for production)
$this->apiUrl = env('AREAGEO_API_URL', $this->apiUrl);
$client = Services::curlrequest([ $client = Services::curlrequest([
'baseURI' => $this->apiUrl, 'baseURI' => $this->apiUrl,
'timeout' => 30, 'timeout' => 30,