diff --git a/app/Http/Livewire/ShowIpTest.php b/app/Http/Livewire/ShowIpTest.php index ebf56ea..7603265 100644 --- a/app/Http/Livewire/ShowIpTest.php +++ b/app/Http/Livewire/ShowIpTest.php @@ -7,20 +7,7 @@ use Illuminate\Support\Facades\Request; class ShowIpTest extends Component { - public $public_ip; - public $local_ip; - - protected $listeners = ['setLocalIP' => 'setLocalIP']; - - public function mount() - { - $this->public_ip = Request::ip(); - } - - public function setLocalIP($data) - { - $this->local_ip = $data['ip']; - } + public string $ipId = ''; public function render() { diff --git a/resources/views/livewire/show-ip-test.blade.php b/resources/views/livewire/show-ip-test.blade.php index 0ef3005..6d82106 100644 --- a/resources/views/livewire/show-ip-test.blade.php +++ b/resources/views/livewire/show-ip-test.blade.php @@ -1,33 +1,8 @@
IP pública (Laravel): {{ $public_ip }}
-IP local (JavaScript): {{ $local_ip ?? 'Detectando...' }}
-Tu IP es: