Skip to content

Commit

Permalink
Merge branch 'release/3.0.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
leandrocfe committed Mar 23, 2024
2 parents 3134f88 + c18fe02 commit e42ebbe
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 e42ebbe

Please sign in to comment.