diff --git a/app/Livewire/Tags/Show.php b/app/Livewire/Tags/Show.php index 8574646d7..3bb669615 100644 --- a/app/Livewire/Tags/Show.php +++ b/app/Livewire/Tags/Show.php @@ -9,6 +9,7 @@ use Livewire\Component; class Show extends Component { + public $tags; public Tag $tag; public $applications; public $services; @@ -17,7 +18,8 @@ class Show extends Component public function mount() { - $tag = Tag::ownedByCurrentTeam()->where('name', request()->tag_name)->first(); + $this->tags = Tag::ownedByCurrentTeam()->get()->unique('name')->sortBy('name'); + $tag = $this->tags->where('name', request()->tag_name)->first(); if (!$tag) { return redirect()->route('tags.index'); } diff --git a/resources/views/livewire/tags/index.blade.php b/resources/views/livewire/tags/index.blade.php index 3f70d2d18..221e82a4a 100644 --- a/resources/views/livewire/tags/index.blade.php +++ b/resources/views/livewire/tags/index.blade.php @@ -1,11 +1,14 @@