diff --git a/packages/admin/resources/views/livewire/pages/attributes/browse.blade.php b/packages/admin/resources/views/livewire/pages/attributes/browse.blade.php index 131b077f..3d0b1f3e 100755 --- a/packages/admin/resources/views/livewire/pages/attributes/browse.blade.php +++ b/packages/admin/resources/views/livewire/pages/attributes/browse.blade.php @@ -1,3 +1,7 @@ +@php + $total = $this->table->getRecords()->total(); +@endphp + diff --git a/packages/admin/routes/admin/product.php b/packages/admin/routes/admin/product.php index 798ad9ad..5a6cc685 100755 --- a/packages/admin/routes/admin/product.php +++ b/packages/admin/routes/admin/product.php @@ -12,7 +12,6 @@ }); if (\Shopper\Feature::enabled('attribute')) { - Route::prefix('attributes')->as('attributes.')->group(function (): void { - Route::get('/', config('shopper.components.product.pages.attribute-index'))->name('index'); - }); + Route::get('attributes', config('shopper.components.product.pages.attribute-index')) + ->name('attributes.index'); } diff --git a/packages/admin/src/Livewire/Pages/Attribute/Browse.php b/packages/admin/src/Livewire/Pages/Attribute/Browse.php index 0f3e7863..4c96a547 100755 --- a/packages/admin/src/Livewire/Pages/Attribute/Browse.php +++ b/packages/admin/src/Livewire/Pages/Attribute/Browse.php @@ -13,7 +13,6 @@ use Filament\Tables\Table; use Illuminate\Contracts\View\View; use Illuminate\Database\Eloquent\Collection; -use Livewire\Attributes\On; use Shopper\Components\Tables\IconColumn; use Shopper\Core\Models\Attribute; use Shopper\Livewire\Pages\AbstractPageComponent; @@ -143,12 +142,9 @@ public function table(Table $table): Table ]); } - #[On('attribute-save')] public function render(): View { - return view('shopper::livewire.pages.attributes.browse', [ - 'total' => Attribute::query()->count(), - ]) + return view('shopper::livewire.pages.attributes.browse') ->title(__('shopper::pages/attributes.menu')); } }