shopper-livewire
Provides patterns for building Livewire components in Laravel Shopper with Filament Forms, Tables, and Actions. Use when creating Pages, SlideOvers, or reusable components.
Installation
Pick a client and clone the repository into its skills directory.
Installation
About this skill
Provides patterns for building Livewire components in Laravel Shopper with Filament Forms, Tables, and Actions. Use when creating Pages, SlideOvers, or reusable components.
How to use
Zainstaluj skill w swoim projekcie Laravel Shopper, umieszczając go w katalogu boost/skills. Upewnij się, że masz zainstalowane zależności: Livewire, Filament Forms, Tables i Actions.
Wybierz typ komponentu, który chcesz utworzyć: Page (strona główna), SlideOver (panel boczny) lub Component (komponent wielokrotnego użytku). Każdy typ ma przypisaną bazową klasę i lokalizację w strukturze projektu.
Dla strony z tabelą rozszerz klasę AbstractPageComponent i zaimplementuj interfejsy HasActions, HasForms i HasTable. Dodaj odpowiednie traity: InteractsWithActions, InteractsWithForms i InteractsWithTable.
W metodzie mount() dodaj autoryzację za pomocą $this->authorize(), aby kontrolować dostęp do komponentu na podstawie uprawnień użytkownika.
Zdefiniuj strukturę tabeli w metodzie table(), konfigurując kolumny (np. TextColumn), ich właściwości (label, searchable, sortable) oraz akcje na rekordach (np. edit, delete).
Zwróć widok Blade z metody render(), używając struktury kontenerów i breadcrumbów z szablonów Shopper. Skill zawiera przykłady pełnej implementacji, które możesz dostosować do swoich potrzeb.