What seems to be the problem:
I have a view with pagination, but I am adding a search engine which does not work, it does not do the binding with the wire:model="search"
Steps to Reproduce:
Livewire View
<x-input.text wire:model="search" id="search" placeholder="Buscar" />
Livewire Controller
<?php
namespace App\Http\Controllers\Dashboard\Slider;
use App\Models\Slide;
use Livewire\Component;
use Livewire\WithPagination;
class SliderListDashboard extends Component
{
use WithPagination;
public $search = '';
public $page = 1;
protected $queryString = [
'search' => ['except' => ''],
'page' => ['except' => 1],
];
public function updatingSearch()
{
$this->resetPage();
}
protected $listeners = ['slideDeleted ' => 'render'];
public function mount()
{
$this->fill(request()->only('search', 'page'));
}
public function render()
{
return view('dashboard.slider.slider-list-dashboard', [
'slides' => Slide::where('title', 'like', '%' . $this->search . '%')->paginate()
])
->layout('layouts.dashboard');
}
}
Are you using the latest version of Livewire: yes
"livewire/livewire": "^2.2",
"laravel/framework": "^8.0",
Do you have any screenshots or code examples: