F
Filament16mo ago
Ninja++

How is this Open/view functionality enabled.

I have tried to find from the documentation but its difficult without visual examples to know what is what. I believe that this is a link to a custom view for this order from the demo project but i am not sure. Can someone please explain what these are called so i can follow the correct documentation. Thanks
11 Replies
Ninja++
Ninja++OP16mo ago
https://demo.filamentphp.com/shop/orders/1001/edit is what this link goes to when you go click the open tab on the above table
ZedoX
ZedoX16mo ago
The screenshot you provided is on the dashboard of the demo app, specifically it is the Widget (a table widget), that shows the LatestOrders.
ZedoX
ZedoX16mo ago
Looking at the source code for this widget, the open table action seems to be a link to the edit page of OrderResource https://github.com/filamentphp/demo/blob/fb782883fb8b14c834572de235df41e8377a4ebd/app/Filament/Widgets/LatestOrders.php#L54
GitHub
demo/app/Filament/Widgets/LatestOrders.php at fb782883fb8b14c834572...
Source code for the demo.filamentphp.com website. Contribute to filamentphp/demo development by creating an account on GitHub.
ZedoX
ZedoX16mo ago
I'd recommend exploring the source code of the demo repo, or even better clone it and play around with it locally
Ninja++
Ninja++OP16mo ago
Is it possible to do this in v2 or should i just give up and go back to my backup before i tried any of the upgrade?
ZedoX
ZedoX16mo ago
GitHub
demo/app/Filament/Widgets/LatestOrders.php at b1985d97700f1d927a814...
Source code for the demo.filamentphp.com website. Contribute to filamentphp/demo development by creating an account on GitHub.
Ninja++
Ninja++OP16mo ago
I see so if i want to add additional things to the page that currrently shows the table i need to make widgets and those widgets can have buttons toggles etc?
ZedoX
ZedoX16mo ago
Yes. Widgets are livewire components, and you can use table builder (and even form builder) in any livewire component
Ninja++
Ninja++OP16mo ago
Ok i will try to create a widget with a simple Boolean switch, I have not done it before Thank you
ZedoX
ZedoX16mo ago
What do you mean, by this what are you trying to do?
Ninja++
Ninja++OP16mo ago
I would like when you look at in this case the materials not only can you see the table for the mateirals that are in the sytem but there are other cards or sections that have names that give you stats about the materials and then when you click an indidvidal record it takes you to a view page that gives you the full information about that material like the orders page in the demo
Want results from more Discord servers?
Add your server