Custom Theme Fixed Header
This component uses the Custom Theme TailwindHeaderFixed
.
You can find its source code in our GitHub Repository.
ID
|
Name
|
Price
|
In Stock
|
Created At
|
---|---|---|---|---|
1
|
Arkansas Possum Pie
|
188,03 €
|
Yes
|
03/11/2024
|
2
|
Albacore Tuna Melt
|
145,93 €
|
Yes
|
01/12/2024
|
3
|
борщ
|
100,19 €
|
Yes
|
02/12/2024
|
4
|
Bacalhau com natas
|
115,28 €
|
No
|
22/11/2024
|
5
|
Baba Ghanoush
|
127,86 €
|
No
|
02/11/2024
|
6
|
Bacon Cheeseburger
|
220,97 €
|
Yes
|
04/11/2024
|
7
|
Baked potato
|
195,18 €
|
Yes
|
28/10/2024
|
8
|
Baklava
|
254,15 €
|
Yes
|
06/12/2024
|
9
|
Bangers and mash
|
172,21 €
|
Yes
|
11/12/2024
|
10
|
Black Pudding
|
230,45 €
|
Yes
|
18/12/2024
|
11
|
Blue cheese dressing
|
240,58 €
|
Yes
|
25/10/2024
|
12
|
Boulliabaise
|
108,09 €
|
Yes
|
18/11/2024
|
13
|
Bread
|
230,39 €
|
Yes
|
26/10/2024
|
14
|
Breaded shrimp
|
169,79 €
|
Yes
|
19/10/2024
|
15
|
Breakfast burrito
|
166,15 €
|
Yes
|
16/12/2024
|
16
|
Brisket
|
276,97 €
|
Yes
|
24/10/2024
|
17
|
Brunswick stew
|
253,14 €
|
Yes
|
06/12/2024
|
18
|
Bruschetta
|
260,61 €
|
No
|
20/10/2024
|
19
|
Buffalo Wings
|
150,66 €
|
No
|
10/12/2024
|
20
|
Buffalo burger
|
174,57 €
|
No
|
07/11/2024
|
21
|
Buffalo wing
|
163,31 €
|
Yes
|
20/10/2024
|
22
|
Calamari
|
52,25 €
|
Yes
|
30/11/2024
|
23
|
Carne pizzaiola
|
63,54 €
|
No
|
07/12/2024
|
24
|
Caviar
|
91,36 €
|
No
|
27/10/2024
|
25
|
Ceviche
|
278,46 €
|
No
|
23/11/2024
|
26
|
Cheesecake
|
113,64 €
|
No
|
28/10/2024
|
27
|
Chicken Biryani
|
243,65 €
|
Yes
|
15/12/2024
|
28
|
Chicken Tikka Masala
|
95,77 €
|
No
|
01/11/2024
|
29
|
Chicken and waffles
|
147,03 €
|
Yes
|
11/12/2024
|
30
|
Chicken bog
|
204,81 €
|
Yes
|
03/11/2024
|
31
|
Chicken fingers
|
212,92 €
|
Yes
|
03/11/2024
|
32
|
Chile Relleno
|
145,47 €
|
No
|
04/12/2024
|
33
|
Chili con carne
|
184,92 €
|
Yes
|
21/11/2024
|
34
|
Chili dog
|
50,77 €
|
Yes
|
24/10/2024
|
35
|
Chimichanga
|
108,98 €
|
Yes
|
27/10/2024
|
36
|
Chinese food
|
259,65 €
|
Yes
|
02/11/2024
|
37
|
Chips and dip
|
163,75 €
|
Yes
|
11/12/2024
|
38
|
Choco pie
|
259,58 €
|
Yes
|
14/12/2024
|
39
|
Chocolate Brownie
|
265,59 €
|
Yes
|
20/11/2024
|
41
|
Chocolate cheesecake
|
158,81 €
|
Yes
|
28/10/2024
|
42
|
Chowder
|
60,50 €
|
Yes
|
01/11/2024
|
43
|
Churrasco
|
167,37 €
|
Yes
|
19/11/2024
|
44
|
Cinnamon Roll
|
233,07 €
|
Yes
|
03/12/2024
|
45
|
Coleslaw
|
162,91 €
|
Yes
|
14/12/2024
|
46
|
Coq Au Vin
|
159,13 €
|
Yes
|
21/10/2024
|
47
|
Cordon bleu
|
190,86 €
|
Yes
|
16/12/2024
|
48
|
Currywurst
|
216,08 €
|
Yes
|
15/12/2024
|
49
|
Eggo
|
96,87 €
|
Yes
|
13/11/2024
|
50
|
Eggs Benedict
|
152,91 €
|
Yes
|
06/12/2024
|
51
|
Eggs Neptune
|
238,43 €
|
Yes
|
03/12/2024
|
52
|
Empanada
|
100,23 €
|
Yes
|
05/11/2024
|
53
|
Energy bar
|
272,40 €
|
Yes
|
18/12/2024
|
54
|
Escargot
|
103,56 €
|
Yes
|
13/12/2024
|
55
|
Fajitas
|
140,20 €
|
Yes
|
21/11/2024
|
56
|
Falafel
|
78,80 €
|
Yes
|
09/11/2024
|
57
|
Fattoush Salad
|
256,51 €
|
Yes
|
26/11/2024
|
58
|
Fish Tacos
|
75,25 €
|
Yes
|
03/12/2024
|
59
|
Fish and Chips!
|
121,90 €
|
Yes
|
25/11/2024
|
60
|
Flan
|
279,36 €
|
Yes
|
21/10/2024
|
61
|
Fortune cookie
|
225,64 €
|
Yes
|
17/11/2024
|
62
|
Francesinha
|
100,15 €
|
Yes
|
14/12/2024
|
63
|
French Onion Soup
|
87,52 €
|
Yes
|
14/12/2024
|
64
|
Fries
|
230,91 €
|
Yes
|
11/11/2024
|
65
|
Frito Pie
|
149,66 €
|
Yes
|
02/11/2024
|
66
|
Fry sauce
|
143,11 €
|
Yes
|
15/12/2024
|
67
|
Funnel Cake
|
116,06 €
|
Yes
|
15/11/2024
|
68
|
Garden salad
|
254,12 €
|
Yes
|
19/10/2024
|
69
|
Garlic bread
|
92,68 €
|
Yes
|
15/12/2024
|
70
|
Gazpacho
|
133,06 €
|
Yes
|
28/10/2024
|
71
|
Goulash
|
187,72 €
|
Yes
|
12/11/2024
|
72
|
Greek salad
|
252,82 €
|
Yes
|
05/12/2024
|
73
|
Grilled Snake
|
165,96 €
|
No
|
07/11/2024
|
74
|
γύρος
|
99,46 €
|
Yes
|
04/12/2024
|
75
|
Gumbo
|
176,41 €
|
Yes
|
22/10/2024
|
76
|
Gyoza
|
89,75 €
|
No
|
25/10/2024
|
77
|
Huevos Rancheros
|
104,82 €
|
Yes
|
28/10/2024
|
78
|
Hummus
|
74,49 €
|
No
|
22/10/2024
|
79
|
Ice Cream
|
122,47 €
|
Yes
|
18/11/2024
|
80
|
Key Lime Pie
|
114,99 €
|
No
|
03/12/2024
|
81
|
Kimchi
|
215,52 €
|
No
|
07/11/2024
|
82
|
Kobe Beef
|
234,35 €
|
No
|
08/11/2024
|
83
|
Kung Pao Chicken
|
245,77 €
|
No
|
24/10/2024
|
84
|
Laksa
|
164,84 €
|
Yes
|
05/12/2024
|
85
|
Lasagna
|
125,44 €
|
No
|
09/12/2024
|
86
|
Liver and onions
|
163,73 €
|
Yes
|
17/12/2024
|
87
|
Lobster Newberg
|
278,89 €
|
Yes
|
17/11/2024
|
88
|
Lobster roll
|
176,75 €
|
Yes
|
20/11/2024
|
89
|
London broil
|
182,29 €
|
No
|
09/12/2024
|
90
|
Lorna Doone
|
97,09 €
|
No
|
03/12/2024
|
91
|
Low Country Boil
|
242,33 €
|
Yes
|
06/12/2024
|
92
|
Macaroni and Cheese
|
76,21 €
|
No
|
15/11/2024
|
93
|
Macaroni and cheese
|
207,29 €
|
No
|
04/11/2024
|
94
|
Macaroni salad
|
247,55 €
|
No
|
19/10/2024
|
95
|
Maine Lobster
|
88,21 €
|
Yes
|
28/11/2024
|
96
|
Mango and Sticky Rice
|
92,10 €
|
No
|
23/10/2024
|
97
|
Maple Bacon Doughnut
|
241,04 €
|
Yes
|
15/11/2024
|
98
|
Maple bacon donut
|
100,20 €
|
No
|
01/12/2024
|
99
|
Maraca pie
|
112,85 €
|
Yes
|
06/11/2024
|
100
|
Margherita Pizza
|
117,43 €
|
No
|
31/10/2024
|
101
|
Mashed potato
|
173,16 €
|
No
|
11/11/2024
|
102
|
Mashed pumpkin
|
237,38 €
|
No
|
30/11/2024
|
103
|
Massaman Curry
|
271,04 €
|
Yes
|
03/11/2024
|
104
|
Matzo Ball Soup
|
139,83 €
|
Yes
|
29/11/2024
|
105
|
Meat Feast Pizza
|
173,03 €
|
No
|
19/10/2024
|
106
|
Meatcake
|
79,40 €
|
No
|
24/11/2024
|
107
|
Meatloaf
|
204,37 €
|
No
|
13/11/2024
|
108
|
Milkshake
|
116,70 €
|
No
|
21/11/2024
|
109
|
Mini pizzas
|
121,74 €
|
No
|
06/11/2024
|
110
|
Mozzarella sticks
|
186,89 €
|
No
|
12/11/2024
|
111
|
Muffuletta
|
51,86 €
|
No
|
22/11/2024
|
112
|
Mulligan stew
|
212,07 €
|
Yes
|
19/11/2024
|
113
|
Naan
|
177,66 €
|
No
|
10/11/2024
|
114
|
New York-Style Pizza
|
54,08 €
|
Yes
|
14/12/2024
|
115
|
Onion Rings
|
204,82 €
|
Yes
|
22/11/2024
|
116
|
Oreo
|
218,30 €
|
No
|
25/11/2024
|
117
|
Osso Buco
|
223,26 €
|
Yes
|
18/11/2024
|
118
|
Paella
|
112,78 €
|
No
|
13/11/2024
|
119
|
Pancakes
|
235,23 €
|
Yes
|
08/12/2024
|
120
|
Parma Ham
|
162,65 €
|
No
|
29/11/2024
|
121
|
Pasta salad
|
179,92 €
|
No
|
11/12/2024
|
122
|
Pastel de Nata
|
100,10 €
|
Yes
|
02/12/2024
|
123
|
Pastrami
|
60,22 €
|
No
|
17/11/2024
|
124
|
Pastrami on Rye
|
93,44 €
|
No
|
09/11/2024
|
125
|
Patty
|
201,19 €
|
Yes
|
10/11/2024
|
126
|
Peixada da chef Nábia
|
100,11 €
|
Yes
|
03/11/2024
|
127
|
Peanut butter
|
149,29 €
|
Yes
|
05/12/2024
|
128
|
Pemmican
|
98,43 €
|
Yes
|
12/12/2024
|
129
|
Pepperoni
|
237,98 €
|
Yes
|
31/10/2024
|
130
|
Pepperoni Pizza
|
245,32 €
|
Yes
|
25/10/2024
|
131
|
Phaal
|
125,50 €
|
No
|
20/11/2024
|
132
|
Philly Cheese Steak
|
178,55 €
|
No
|
02/12/2024
|
133
|
Polenta
|
58,46 €
|
Yes
|
30/10/2024
|
134
|
Potato Wedges
|
262,41 €
|
Yes
|
11/12/2024
|
135
|
Potato salad
|
192,92 €
|
Yes
|
15/11/2024
|
136
|
Potato skins
|
237,17 €
|
No
|
24/10/2024
|
137
|
Potato wedges
|
220,49 €
|
No
|
27/11/2024
|
138
|
Poutine
|
248,91 €
|
No
|
08/12/2024
|
139
|
Quesadilla
|
72,92 €
|
Yes
|
06/12/2024
|
140
|
Ratatouille
|
264,13 €
|
No
|
23/10/2024
|
141
|
Ribs
|
272,17 €
|
No
|
30/10/2024
|
142
|
Risotto
|
196,46 €
|
Yes
|
03/12/2024
|
143
|
Roasted Bone Marrow
|
221,93 €
|
Yes
|
15/11/2024
|
144
|
Roasted Chickpeas
|
148,73 €
|
Yes
|
17/12/2024
|
145
|
Samosa
|
264,74 €
|
No
|
11/12/2024
|
146
|
Schnitzel
|
171,20 €
|
Yes
|
30/11/2024
|
147
|
Scrapple
|
270,72 €
|
Yes
|
13/12/2024
|
148
|
Sloppy joe
|
144,37 €
|
No
|
03/12/2024
|
149
|
Souvlaki
|
225,76 €
|
Yes
|
07/12/2024
|
150
|
Spaghetti Bolognese
|
193,57 €
|
No
|
14/11/2024
|
151
|
Spaghetti and Meatballs
|
219,92 €
|
No
|
09/11/2024
|
152
|
Spanish rice
|
228,02 €
|
No
|
26/11/2024
|
153
|
Spring Rolls
|
99,43 €
|
Yes
|
11/11/2024
|
154
|
Squab
|
84,71 €
|
Yes
|
08/11/2024
|
155
|
St. Paul Sandwich
|
276,20 €
|
No
|
13/12/2024
|
156
|
Steak Tartare
|
99,11 €
|
Yes
|
05/12/2024
|
157
|
Steak sandwich
|
260,21 €
|
No
|
02/11/2024
|
158
|
Steak sauce
|
102,05 €
|
No
|
11/12/2024
|
159
|
Steamed clams
|
128,62 €
|
No
|
04/12/2024
|
160
|
Stroganoff
|
63,84 €
|
No
|
12/12/2024
|
161
|
Stuffed ham
|
92,30 €
|
No
|
30/10/2024
|
162
|
Stuffed peppers
|
103,96 €
|
No
|
06/11/2024
|
163
|
Stuffed zucchini
|
127,00 €
|
No
|
16/11/2024
|
164
|
Succotash
|
98,33 €
|
No
|
02/12/2024
|
165
|
Suckling Pig
|
219,76 €
|
Yes
|
06/11/2024
|
166
|
Supreme pizza
|
140,08 €
|
No
|
28/11/2024
|
167
|
Surf and turf
|
109,87 €
|
Yes
|
25/11/2024
|
168
|
Sushi
|
241,02 €
|
No
|
02/11/2024
|
169
|
Sueli's Sushi Boat
|
84,60 €
|
Yes
|
27/11/2024
|
170
|
Sweet Potato Fries
|
58,06 €
|
Yes
|
04/12/2024
|
171
|
Sweetbreads
|
113,14 €
|
Yes
|
19/10/2024
|
172
|
Swiss steak
|
66,42 €
|
No
|
18/12/2024
|
173
|
Tagine
|
182,00 €
|
No
|
20/11/2024
|
174
|
Tamales
|
257,86 €
|
Yes
|
04/11/2024
|
175
|
Tetrazzini
|
136,03 €
|
Yes
|
23/10/2024
|
176
|
Texas Toast
|
116,15 €
|
No
|
14/12/2024
|
177
|
Thousand Island dressing
|
172,68 €
|
Yes
|
28/11/2024
|
178
|
Tin Roof Ice Cream
|
84,44 €
|
Yes
|
18/11/2024
|
179
|
Toaster Strudel
|
123,89 €
|
No
|
21/11/2024
|
180
|
Tomato compote
|
152,55 €
|
Yes
|
26/11/2024
|
181
|
Tres Leches Cake
|
68,73 €
|
No
|
18/12/2024
|
182
|
Tuna Pizza
|
125,88 €
|
Yes
|
02/12/2024
|
183
|
Tuna casserole
|
94,90 €
|
Yes
|
24/10/2024
|
184
|
Turducken
|
87,96 €
|
No
|
12/11/2024
|
185
|
Turkish Delight
|
191,09 €
|
No
|
04/12/2024
|
186
|
Vitão's Chocolate pie
|
104,31 €
|
Yes
|
14/12/2024
|
187
|
Veggie Pizza
|
278,10 €
|
Yes
|
23/11/2024
|
188
|
Venison
|
255,74 €
|
Yes
|
25/10/2024
|
189
|
Vichyssoise
|
162,90 €
|
No
|
09/12/2024
|
190
|
Waffle
|
93,49 €
|
No
|
29/10/2024
|
191
|
Wasabi Peas
|
204,95 €
|
No
|
25/10/2024
|
192
|
White chocolate cookie
|
240,53 €
|
Yes
|
12/11/2024
|
193
|
Yeung Chow fried rice
|
68,12 €
|
Yes
|
28/10/2024
|
Disclaimer: Table data is randomly generated for
illustrative purposes only. The information here is not a reflection of the actual market and does
not constitute business, financial, or medical advice.
<?php
namespace App\Livewire\Examples\CustomThemeFixedHeaderTable;
use App\Helpers\PowerGridThemes\TailwindHeaderFixed;
use App\Models\Dish;
use Illuminate\Database\Query\Builder;
use Illuminate\Support\Carbon;
use Illuminate\Support\Number;
use Livewire\Attributes\On;
use PowerComponents\LivewirePowerGrid\Column;
use PowerComponents\LivewirePowerGrid\Facades\PowerGrid;
use PowerComponents\LivewirePowerGrid\PowerGridComponent;
use PowerComponents\LivewirePowerGrid\PowerGridFields;
class CustomThemeFixedHeaderTable extends PowerGridComponent
{
public string $tableName = 'custom-theme-fixed-header-table';
public function setUp(): array
{
return [
PowerGrid::header()
->showSearchInput(),
PowerGrid::footer()
->showRecordCount(),
];
}
public function datasource(): ?Builder
{
return Dish::query()
->join('categories as newCategories', function ($categories) {
$categories->on('dishes.category_id', '=', 'newCategories.id');
})
->select('dishes.*', 'newCategories.name as category_name')
->toBase();
}
public function fields(): PowerGridFields
{
return PowerGrid::fields()
->add('id')
->add('name')
->add('price')
->add('price_in_eur', fn ($dish) => Number::currency($dish->price, in: 'EUR', locale: 'pt_PT'))
->add('in_stock', fn ($dish) => $dish->in_stock ? 'Yes' : 'No')
->add('created_at_formatted', fn ($dish) => Carbon::parse($dish->created_at)->format('d/m/Y'));
}
public function columns(): array
{
return [
Column::make('ID', 'id')
->searchable()
->sortable(),
Column::make('Name', 'name')
->bodyAttribute('!text-wrap')
->searchable()
->sortable(),
Column::make('Price', 'price_in_eur', 'price')
->searchable()
->sortable(),
Column::make('In Stock', 'in_stock'),
Column::make('Created At', 'created_at_formatted'),
];
}
#[On('edit')]
public function edit(int $dishId): void
{
$this->js('alert(' . $dishId . ')');
}
public function customThemeClass(): ?string
{
return TailwindHeaderFixed::class;
}
}