googleMapsApiKey = config('services.maps.providers.google.api_key', ''); $this->mapboxApiKey = config('services.maps.providers.mapbox.api_key', ''); $this->defaultProvider = config('services.maps.default_provider', 'openstreetmap'); $this->loadProvidersStatus(); } public function loadProvidersStatus() { $mapService = app(MapService::class); $this->providersStatus = $mapService->getAllProvidersStatus(); } public function saveSettings() { // Note: In a real application, you would save these to a database // or update the .env file programmatically session()->flash('success', 'Settings saved! Please update your .env file with the API keys and restart the application.'); } public function testProvider($provider) { $mapService = app(MapService::class); if ($mapService->isProviderEnabled($provider)) { session()->flash('success', "✅ {$provider} is configured and working!"); } else { session()->flash('error', "❌ {$provider} requires API key configuration."); } $this->loadProvidersStatus(); } public function render() { return view('livewire.map-settings'); } }