diff --git a/app/Http/Livewire/Backend/TaxonomyTermTable.php b/app/Http/Livewire/Backend/TaxonomyTermTable.php index 7de107b..e21ea26 100644 --- a/app/Http/Livewire/Backend/TaxonomyTermTable.php +++ b/app/Http/Livewire/Backend/TaxonomyTermTable.php @@ -47,8 +47,8 @@ public function query(): Builder { return TaxonomyTerm::query() ->where('taxonomy_id', $this->taxonomy->id) - ->when($this->getFilter('taxonomy_term'), fn($query, $type) => $query->where('parent_id', $type)) - ->with('user'); + ->when($this->getFilter('taxonomy_term'), fn($query, $type) => $query->where('parent_id', $type)->orWhere('id', $type)) + ->with('user')->orderBy('parent_id'); } public function filters(): array diff --git a/resources/views/backend/taxonomy/terms/index-table-row.blade.php b/resources/views/backend/taxonomy/terms/index-table-row.blade.php index 75a4fa2..769c674 100644 --- a/resources/views/backend/taxonomy/terms/index-table-row.blade.php +++ b/resources/views/backend/taxonomy/terms/index-table-row.blade.php @@ -10,7 +10,9 @@ @if ($row->parent_id != null) - {{ $row->parent->name }} + + {{ $row->parent->name }} + @else N/A @endif