Skip to content

Commit

Permalink
Merge branch 'leandrocfe:master' into feat/adicionando-compatibilidad…
Browse files Browse the repository at this point in the history
…e-laravel-11
  • Loading branch information
patriciomartinns authored Mar 24, 2024
2 parents a267f5a + db08ca3 commit 0e1d5ef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion config/filament-ptbr-form-fields.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<?php

return [];
return [
'viacep_url' => env('VIACEP_URL', 'viacep.com.br/ws/'),
];
2 changes: 1 addition & 1 deletion src/Cep.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function viaCep(string $mode = 'suffix', string $errorMessage = 'CEP inv

$livewire->validateOnly($component->getKey());

$request = Http::get("viacep.com.br/ws/$state/json/")->json();
$request = Http::get(config('filament-ptbr-form-fields.viacep_url').$state.'/json/')->json();

foreach ($setFields as $key => $value) {
$set($key, $request[$value] ?? null);
Expand Down

0 comments on commit 0e1d5ef

Please sign in to comment.