mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-18 16:13:49 +00:00
Add tags to show and index views
This commit is contained in:
1 parent
8c60ef5bd6
commit
8b58c8f856
3 files changed
+33
-14
No files matched your search
@@ -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');
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user