created color search function

This commit is contained in:
2025-03-16 02:11:38 +01:00
parent 9b3913b68c
commit 820058dab0
3 changed files with 13 additions and 3 deletions
+3 -1
View File
@@ -24,6 +24,8 @@ class Color extends Component
public $createModal = false;
public $search ='';
public function create() {
@Auth::check();
@@ -52,7 +54,7 @@ class Color extends Component
public function render()
{
return view('livewire.filament.color', [
'colors' => ColorModel::paginate(10)
'colors' => ColorModel::search('name', $this->search)->paginate(10)
]);
}
}