Custom View Page using Filament Table Builder
I want to create a custom view page that can use Filament's Table Builder and build tables instead of using HTML/CSS . I am sure that's why FIlmanet tables is for. but I am confused about how to do it.
I have a ViewOrder.php where I have done this:
protected static string $view = 'filament.resources.orders.pages.view-order';
</x-filament::page>
html and css code here
</x-filament::page>
It is working fine but I am using html/css to manually build the page.
9 Replies
You can use the separate table builder for the table stuff.
https://filamentphp.com/docs/2.x/tables/installation
Filament
Installation - Table Builder - Filament
The elegant TALL stack table builder for Laravel artisans.
I have the whole filament/filament installed. @Dennis Koch
Yes. But for custom tables you still need to follow the table builder docs
Admin panel is just a wrapper around form builder or table builder
Okay. There is no direct way to use table builder to show tables inside a blade file without using filament/tables ?
table builder IS filament/tables
https://filamentphp.com/docs/2.x/tables/getting-started#preparing-your-livewire-component
Is this different from what you're saying?
Filament
Getting started - Table Builder - Filament
The elegant TALL stack table builder for Laravel artisans.
No, that's the right way
ListPage
from the admin panel is also doing the same thing, but hiding things to make stuff easierokay. So please help me in this case:
class ViewDiscount extends ViewRecord
{
protected static string $resource = DiscountResource::class;
protected static string $view = 'filament.resources.discount-resource.pages.view-discount';
protected function getActions(): array
{
return [];
}
}
This is my ViewDiscount.
Can i create a table here or somewhere using filament syntax, and then load it directly in view-discount ?
@Dennis Koch Or to achieve this, should I create a livewire component and do it instead?
ViewRecord is a livewire component so it should be possible to add this here