diff --git a/app/Database/Seeds/AreaGeoSeeder.php b/app/Database/Seeds/AreaGeoSeeder.php index 8fb080e..bf44e1f 100644 --- a/app/Database/Seeds/AreaGeoSeeder.php +++ b/app/Database/Seeds/AreaGeoSeeder.php @@ -12,13 +12,7 @@ class AreaGeoSeeder extends Seeder * API configuration for fetching zones data * Configure in .env: AREAGEO_API_URL=https://services-summit.my.id/api/zones */ - protected string $apiUrl; - - public function __construct() - { - parent::__construct(); - $this->apiUrl = env('AREAGEO_API_URL', 'http://services-summit.my.id/api/zones'); - } + protected string $apiUrl = 'http://services-summit.my.id/api/zones'; // public function run() // { @@ -66,6 +60,9 @@ class AreaGeoSeeder extends Seeder // } 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([ 'baseURI' => $this->apiUrl, 'timeout' => 30,