['except' => ''] ]; /** @var string */ public $orderColumn = 'created_at'; /** @var string */ public $orderDirection = 'DESC'; /** @var int */ public $perPage = 10; /** @var string */ public $search; public function mount() { $this->search = request()->query('search', $this->search); } public function updatingSearch() { $this->resetPage(); } public function render() { return view('livewire.collaborators.associates.index', [ 'associates' => Associate::with('category')->where('name', 'LIKE', '%' . $this->search . '%')->orderBy($this->orderColumn, $this->orderDirection)->paginate($this->perPage), ]); } }