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
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
The screenshot you provided is on the dashboard of the demo app, specifically it is the Widget (a table widget), that shows the LatestOrders.
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.
I'd recommend exploring the source code of the demo repo, or even better clone it and play around with it locally
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?
Yup this widget exister on the v2 demo as well
https://github.com/filamentphp/demo/blob/b1985d97700f1d927a814c03645c24c2afdad437/app/Filament/Widgets/LatestOrders.php#L71
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.
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?
Yes. Widgets are livewire components, and you can use table builder (and even form builder) in any livewire component
Ok i will try to create a widget with a simple Boolean switch, I have not done it before Thank you
What do you mean, by this what are you trying to do?
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