Workflow
Custom Theme Fixed Header

This component uses the Custom Theme TailwindHeaderFixed.

You can find its source code in our GitHub Repository.

ID
Name
Category
Price
In Stock
Created At
1
Arkansas Possum Pie
Pasta
78,43 €
Yes
09/05/2024
2
Albacore Tuna Melt
Pie
89,90 €
Yes
29/04/2024
3
борщ
Soup
100,19 €
Yes
24/04/2024
4
Bacalhau com natas
Dessert
213,37 €
Yes
10/05/2024
5
Baba Ghanoush
Pasta
263,16 €
No
18/03/2024
6
Bacon Cheeseburger
Pasta
61,67 €
No
09/04/2024
7
Baked potato
Meat
148,63 €
No
26/03/2024
8
Baklava
Pie
127,07 €
No
12/04/2024
9
Bangers and mash
Meat
181,73 €
Yes
04/05/2024
10
Black Pudding
Pie
133,18 €
Yes
01/04/2024
11
Blue cheese dressing
Dessert
62,79 €
Yes
30/03/2024
12
Boulliabaise
Dessert
121,92 €
Yes
28/03/2024
13
Bread
Dessert
279,14 €
No
12/05/2024
14
Breaded shrimp
Fish
212,34 €
Yes
11/05/2024
15
Breakfast burrito
Pasta
186,85 €
Yes
12/05/2024
16
Brisket
Fish
252,00 €
Yes
16/04/2024
17
Brunswick stew
Soup
125,69 €
No
07/04/2024
18
Bruschetta
Soup
239,10 €
No
05/04/2024
19
Buffalo Wings
Fish
265,65 €
No
25/03/2024
20
Buffalo burger
Dessert
112,10 €
Yes
08/04/2024
21
Buffalo wing
Dessert
199,28 €
Yes
07/04/2024
22
Calamari
Meat
89,34 €
Yes
17/04/2024
23
Carne pizzaiola
Soup
174,86 €
Yes
02/05/2024
24
Caviar
Soup
231,62 €
No
30/03/2024
25
Ceviche
Pasta
197,07 €
Yes
04/05/2024
26
Cheesecake
Pasta
208,05 €
Yes
12/04/2024
27
Chicken Biryani
Dessert
155,54 €
Yes
09/05/2024
28
Chicken Tikka Masala
Pie
225,07 €
No
02/04/2024
29
Chicken and waffles
Dessert
77,59 €
No
07/05/2024
30
Chicken bog
Meat
56,93 €
Yes
24/04/2024
31
Chicken fingers
Soup
205,40 €
No
31/03/2024
32
Chile Relleno
Pie
133,17 €
No
23/04/2024
33
Chili con carne
Soup
179,75 €
No
22/04/2024
34
Chili dog
Dessert
221,15 €
No
28/03/2024
35
Chimichanga
Pie
98,65 €
No
23/03/2024
36
Chinese food
Fish
137,70 €
No
24/03/2024
37
Chips and dip
Garnish
206,12 €
No
23/03/2024
38
Choco pie
Garnish
237,27 €
Yes
26/04/2024
39
Chocolate Brownie
Garnish
200,50 €
No
11/05/2024
41
Chocolate cheesecake
Dessert
158,19 €
Yes
07/04/2024
42
Chowder
Fish
88,46 €
No
08/04/2024
43
Churrasco
Pasta
197,76 €
No
02/04/2024
44
Cinnamon Roll
Dessert
165,26 €
Yes
25/04/2024
45
Coleslaw
Fish
107,48 €
Yes
23/04/2024
46
Coq Au Vin
Fish
112,36 €
No
08/04/2024
47
Cordon bleu
Garnish
111,82 €
Yes
11/04/2024
48
Currywurst
Meat
272,81 €
No
30/03/2024
49
Eggo
Meat
117,32 €
Yes
07/04/2024
50
Eggs Benedict
Dessert
139,53 €
No
18/04/2024
51
Eggs Neptune
Dessert
82,88 €
Yes
13/04/2024
52
Empanada
Pie
93,41 €
Yes
02/04/2024
53
Energy bar
Fish
102,05 €
Yes
10/04/2024
54
Escargot
Meat
61,98 €
Yes
30/03/2024
55
Fajitas
Pasta
91,03 €
Yes
12/04/2024
56
Falafel
Pasta
54,12 €
Yes
14/04/2024
57
Fattoush Salad
Garnish
98,09 €
Yes
15/04/2024
58
Fish Tacos
Meat
169,47 €
No
28/04/2024
59
Fish and Chips!
Fish
219,11 €
Yes
24/03/2024
60
Flan
Garnish
63,93 €
No
29/03/2024
61
Fortune cookie
Pie
124,77 €
No
26/04/2024
62
Francesinha
Meat
100,15 €
Yes
08/04/2024
63
French Onion Soup
Fish
203,60 €
No
08/04/2024
64
Fries
Fish
155,26 €
Yes
26/04/2024
65
Frito Pie
Garnish
244,01 €
Yes
24/04/2024
66
Fry sauce
Soup
201,89 €
No
14/04/2024
67
Funnel Cake
Dessert
181,38 €
Yes
28/04/2024
68
Garden salad
Pie
240,15 €
Yes
18/05/2024
69
Garlic bread
Pie
277,44 €
Yes
25/03/2024
70
Gazpacho
Pasta
197,78 €
No
16/04/2024
71
Goulash
Meat
161,59 €
Yes
16/05/2024
72
Greek salad
Garnish
70,57 €
No
09/05/2024
73
Grilled Snake
Fish
274,42 €
Yes
29/03/2024
74
γύρος
Pie
238,58 €
No
25/03/2024
75
Gumbo
Garnish
151,44 €
No
06/05/2024
76
Gyoza
Dessert
119,30 €
No
17/05/2024
77
Huevos Rancheros
Pie
226,37 €
No
07/04/2024
78
Hummus
Meat
110,61 €
Yes
14/05/2024
79
Ice Cream
Garnish
131,70 €
No
26/03/2024
80
Key Lime Pie
Fish
94,18 €
Yes
21/03/2024
81
Kimchi
Pie
50,55 €
Yes
25/04/2024
82
Kobe Beef
Meat
171,81 €
No
30/04/2024
83
Kung Pao Chicken
Meat
73,59 €
No
12/05/2024
84
Laksa
Garnish
246,57 €
Yes
04/04/2024
85
Lasagna
Soup
194,56 €
Yes
29/04/2024
86
Liver and onions
Dessert
227,46 €
Yes
15/05/2024
87
Lobster Newberg
Dessert
195,51 €
Yes
19/04/2024
88
Lobster roll
Pie
55,92 €
Yes
04/04/2024
89
London broil
Meat
108,55 €
Yes
21/04/2024
90
Lorna Doone
Dessert
79,01 €
No
11/04/2024
91
Low Country Boil
Dessert
188,59 €
Yes
30/03/2024
92
Macaroni and Cheese
Fish
65,68 €
No
02/04/2024
93
Macaroni and cheese
Fish
98,49 €
No
25/04/2024
94
Macaroni salad
Pasta
74,52 €
No
21/03/2024
95
Maine Lobster
Fish
132,38 €
No
18/04/2024
96
Mango and Sticky Rice
Soup
276,34 €
Yes
13/05/2024
97
Maple Bacon Doughnut
Dessert
245,29 €
No
07/05/2024
98
Maple bacon donut
Garnish
196,89 €
Yes
07/05/2024
99
Maraca pie
Pasta
196,53 €
No
25/04/2024
100
Margherita Pizza
Fish
120,52 €
No
20/03/2024
101
Mashed potato
Pie
68,35 €
Yes
07/05/2024
102
Mashed pumpkin
Soup
258,96 €
No
14/04/2024
103
Massaman Curry
Dessert
114,19 €
No
07/04/2024
104
Matzo Ball Soup
Fish
156,17 €
No
27/04/2024
105
Meat Feast Pizza
Garnish
84,50 €
Yes
21/03/2024
106
Meatcake
Pasta
217,96 €
No
18/04/2024
107
Meatloaf
Fish
257,89 €
No
18/03/2024
108
Milkshake
Pie
260,12 €
Yes
24/03/2024
109
Mini pizzas
Dessert
118,16 €
No
20/03/2024
110
Mozzarella sticks
Dessert
50,02 €
Yes
04/04/2024
111
Muffuletta
Garnish
244,29 €
Yes
14/05/2024
112
Mulligan stew
Garnish
244,13 €
No
31/03/2024
113
Naan
Dessert
131,50 €
No
14/05/2024
114
New York-Style Pizza
Meat
227,88 €
No
28/03/2024
115
Onion Rings
Pie
139,34 €
No
21/04/2024
116
Oreo
Garnish
256,87 €
No
07/04/2024
117
Osso Buco
Dessert
107,33 €
No
06/04/2024
118
Paella
Pie
77,86 €
No
16/04/2024
119
Pancakes
Pie
159,35 €
No
16/05/2024
120
Parma Ham
Pie
226,46 €
No
15/04/2024
121
Pasta salad
Pie
103,65 €
Yes
09/05/2024
122
Pastel de Nata
Dessert
100,10 €
Yes
06/04/2024
123
Pastrami
Fish
235,10 €
Yes
12/05/2024
124
Pastrami on Rye
Fish
218,96 €
Yes
23/03/2024
125
Patty
Pasta
274,76 €
Yes
23/04/2024
126
Peixada da chef Nábia
Meat
100,11 €
Yes
06/04/2024
127
Peanut butter
Garnish
80,13 €
Yes
30/04/2024
128
Pemmican
Pasta
113,81 €
No
15/04/2024
129
Pepperoni
Garnish
67,43 €
Yes
22/04/2024
130
Pepperoni Pizza
Garnish
274,46 €
No
23/04/2024
131
Phaal
Dessert
115,90 €
No
04/05/2024
132
Philly Cheese Steak
Fish
181,02 €
No
04/05/2024
133
Polenta
Pie
200,47 €
Yes
25/03/2024
134
Potato Wedges
Garnish
80,57 €
No
17/05/2024
135
Potato salad
Soup
112,93 €
Yes
07/04/2024
136
Potato skins
Pasta
68,01 €
Yes
22/03/2024
137
Potato wedges
Soup
98,35 €
Yes
16/04/2024
138
Poutine
Fish
118,08 €
Yes
20/04/2024
139
Quesadilla
Garnish
273,58 €
Yes
29/03/2024
140
Ratatouille
Garnish
202,69 €
Yes
04/04/2024
141
Ribs
Pie
110,08 €
Yes
09/05/2024
142
Risotto
Meat
183,78 €
Yes
19/03/2024
143
Roasted Bone Marrow
Meat
244,30 €
No
11/04/2024
144
Roasted Chickpeas
Meat
210,20 €
No
31/03/2024
145
Samosa
Meat
58,58 €
No
29/04/2024
146
Schnitzel
Pasta
66,20 €
No
09/04/2024
147
Scrapple
Pasta
172,75 €
Yes
24/04/2024
148
Sloppy joe
Pasta
57,47 €
No
22/04/2024
149
Souvlaki
Dessert
171,48 €
Yes
07/05/2024
150
Spaghetti Bolognese
Pasta
136,67 €
No
06/05/2024
151
Spaghetti and Meatballs
Soup
207,89 €
No
02/04/2024
152
Spanish rice
Meat
179,83 €
No
25/03/2024
153
Spring Rolls
Dessert
229,52 €
Yes
07/05/2024
154
Squab
Dessert
207,65 €
Yes
22/04/2024
155
St. Paul Sandwich
Soup
241,68 €
No
16/04/2024
156
Steak Tartare
Meat
128,75 €
No
06/04/2024
157
Steak sandwich
Fish
183,72 €
Yes
20/04/2024
158
Steak sauce
Meat
116,31 €
No
10/04/2024
159
Steamed clams
Pasta
116,84 €
No
29/04/2024
160
Stroganoff
Garnish
194,16 €
No
16/04/2024
161
Stuffed ham
Dessert
58,02 €
Yes
16/04/2024
162
Stuffed peppers
Pasta
201,24 €
No
14/05/2024
163
Stuffed zucchini
Meat
62,26 €
No
06/04/2024
164
Succotash
Soup
165,93 €
No
10/05/2024
165
Suckling Pig
Soup
146,23 €
No
04/05/2024
166
Supreme pizza
Pasta
236,12 €
Yes
28/03/2024
167
Surf and turf
Meat
244,73 €
Yes
21/03/2024
168
Sushi
Pasta
167,01 €
Yes
04/05/2024
169
Sueli's Sushi Boat
Soup
217,27 €
No
11/04/2024
170
Sweet Potato Fries
Soup
188,51 €
Yes
23/03/2024
171
Sweetbreads
Dessert
109,45 €
Yes
03/05/2024
172
Swiss steak
Pie
85,68 €
Yes
15/04/2024
173
Tagine
Soup
207,55 €
No
27/04/2024
174
Tamales
Fish
54,67 €
Yes
15/05/2024
175
Tetrazzini
Pasta
58,24 €
Yes
27/04/2024
176
Texas Toast
Pie
185,62 €
Yes
09/05/2024
177
Thousand Island dressing
Meat
225,01 €
No
10/05/2024
178
Tin Roof Ice Cream
Pasta
99,53 €
Yes
10/05/2024
179
Toaster Strudel
Fish
134,70 €
No
22/04/2024
180
Tomato compote
Garnish
168,20 €
Yes
31/03/2024
181
Tres Leches Cake
Garnish
88,32 €
No
28/04/2024
182
Tuna Pizza
Garnish
161,51 €
Yes
07/05/2024
183
Tuna casserole
Dessert
232,36 €
Yes
03/05/2024
184
Turducken
Soup
191,99 €
No
06/04/2024
185
Turkish Delight
Pasta
75,77 €
No
30/03/2024
186
Vitão's Chocolate pie
Dessert
133,36 €
No
05/05/2024
187
Veggie Pizza
Meat
212,81 €
Yes
01/04/2024
188
Venison
Pie
214,06 €
No
15/04/2024
189
Vichyssoise
Pasta
161,26 €
Yes
10/04/2024
190
Waffle
Soup
80,83 €
No
11/04/2024
191
Wasabi Peas
Garnish
151,59 €
No
23/04/2024
192
White chocolate cookie
Fish
239,36 €
Yes
26/04/2024
193
Yeung Chow fried rice
Soup
250,95 €
Yes
24/03/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\Footer;
use PowerComponents\LivewirePowerGrid\Header;
use PowerComponents\LivewirePowerGrid\PowerGrid;
use PowerComponents\LivewirePowerGrid\PowerGridComponent;
use PowerComponents\LivewirePowerGrid\PowerGridFields;
 
class CustomThemeFixedHeaderTable extends PowerGridComponent
{
public function setUp(): array
{
return [
Header::make()
->showSearchInput(),
 
Footer::make()
->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('category_id', fn ($dish) => intval($dish->category_id))
->add('category_name', fn ($dish) => e($dish->category_name))
->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('Category', 'category_name'),
 
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 template(): ?string
{
return TailwindHeaderFixed::class;
}
}
Code highlighting provided by Torchlight.dev

Here you can find all relevant packages installed on this demo.

Name
Version
Description
laravel/framework
v11
The Laravel Framework.
livewire/livewire
v3.4.12
A front-end framework for Laravel.
openspout/openspout
v4.24.0
PHP Library to read and write spreadsheet files (CSV, XLSX and ODS), in a fast and scalable way
power-components/livewire-powergrid
v5.6.3
PowerGrid generates Advanced Datatables using Laravel Livewire.