I receive the following message in the web console
What message?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
The following code works on my Windows 11 / Apache setup. However, on Hostinger Ubuntu / Nginx, I receive the following message in the web console: https://meusite/livewire/update. It appears in the list when I run php artisan route:list, but I’m not sure whether Laravel can actually recognize this folder in Hostinger’s environment. At the very least, I can't see this folder, not even here on Windows.
I believe this is one of the best pieces of code I’ve ever written—it’s a shame it doesn’t work on Hostinger.
File: app/Livewire/Lteste.php
<?php
namespace App\Livewire;
use App\Models\tbprevisao;
use Illuminate\Support\Facades\DB;
use Livewire\Component;
class Lteste extends Component {
public $id, $novoValor, $modal, $previsoes;
function update() {
$this->modal = false;
$valor = deca($this->novoValor);
tbprevisao::where('id', $this->id)->update(['valor' => $valor]);
$this->previsoes = DB::table('tbprevisao')->join('tbw', 'tbprevisao.conta', 'tbw.conta')
->orderBy('tbprevisao.conta')->get();
}
function mount() {
$this->previsoes = DB::table('tbprevisao')->join('tbw', 'tbprevisao.conta', 'tbw.conta')
->orderBy('tbprevisao.conta')->get();
}
function selecionado($id) {
$this->id = $id;
$this->modal = true;
}
}
File: resources/views/livewire/lteste.blade.php
<div>
<div class="flex odd:bg-gray-200">
<div class="w-[50px] text-right">Account</div>
<div class="w-[188px] px-2">Description</div>
<div class="w-[130px] text-right">Forecast</div>
<div class="w-[130px] text-right">Daily</div>
<div class="w-[130px] text-right">Deviation</div>
</div>
@foreach($previsoes as $p)
<div class="odd:bg-gray-200 flex" wire:click="selecionado({{ $p->id }})">
<div class="w-[50px] text-right">{{$p->conta}}</div>
<div class="w-[188px] px-2 truncate">{{$p->descricao}}</div>
@if($modal && $id == $p->id)
<div class="w-[130px] text-right">
<flux:input wire:model="novoValor" wire:change="update" size="xs" />
</div>
@else
<div class="w-[130px] text-right">{{dec($p->valor)}}</div>
@endif
<div class="w-[130px] text-right">{{dec($p->fim)}}</div>
<div class="w-[130px] text-right">
{{dec(abs(round($p->valor - $p->fim + 0.0001,2)))}}
</div>
</div>
@endforeach
</div>
Finally, I managed to work with Livewire's wire:model using MySQL. Copilot helped me a lot in creating the code without receiving the "Livewire encountered corrupted data" message on Hostinger:
<?php
namespace App\Livewire;
use App\Models\tbprevisao;
use Livewire\Component;
class Lteste extends Component {
public $previsao;
function mount() {
$this->previsao = tbprevisao::orderBy('conta')
->take(3)->get()->toArray();
}
function updated($propertyName) {
$previa=explode(".",$propertyName);
$indice=$previa[1];
$id=$this->previsao[$indice]['id'];
$valor = data_get($this, $propertyName);
tbprevisao::where('id', $id)
->update(['valor' => $valor]);
}
}
<div class="w-[100px]">
<flux:input wire:model="previsao.0.valor" wire:change="$refresh" />
<flux:input wire:model="previsao.1.valor" wire:change="$refresh" />
<flux:input wire:model="previsao.2.valor" wire:change="$refresh" />
<pre>{{ print_r($previsao) }}</pre>
</div>
Please or to participate in this conversation.