Skip to content

Commit

Permalink
Added features search to guild list
Browse files Browse the repository at this point in the history
Signed-off-by: Felix <github@fbrettnich.de>
  • Loading branch information
fbrettnich committed May 18, 2024
1 parent da6746e commit b510e16
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app/Http/Livewire/Guildlist.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ public function search()
$this->guildsJsonSearch = array_filter($this->guildsJson, function ($var) use ($filterBy) {
return (
str_contains(strtolower($var['id']), strtolower($filterBy)) ||
str_contains(strtolower($var['name']), strtolower($filterBy))
str_contains(strtolower($var['name']), strtolower($filterBy)) ||
str_contains(strtolower(implode(' ', $var['features'])), strtolower($filterBy))
);
});

Expand Down
2 changes: 1 addition & 1 deletion resources/views/guildlist.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
<input
wire:model="search"
type="text"
placeholder="{{ __('Search...') }}"
placeholder="{{ __('Search for Names, IDs or Features...') }}"
class="block border-none rounded pl-12 pr-5 py-3 leading-6 w-full bg-discord-gray-1 focus:outline-none focus:ring-0"
>
</x-input-prepend-icon>
Expand Down

0 comments on commit b510e16

Please sign in to comment.