Reuse infolist modal from resource on Notification view action
Is it possible to show an infolist modal from a Resource I have already defined ?
I'm sending a notification to some user, with a "More details" button, and I would like to know if this is easily achievable, or I have to build the infolist separately.
Solution:Jump to solution
If you use a specific infolist setup in different places, you can create a reusable component to extract it.
7 Replies
No one? Is an obvious question?
Not sure about you already defined. but you can display infolist instead of form in action:
Thank you for answering!
I'm talking about using an already created infolist (the one I defined on my ModelResource):
from what you wrote, I understand I would be generating a new empty infolist, right ?
Thats not what I'm asking for.
Instead, I'm talking about something like ExampleResource::getInfolist()
I have found some ppl asking for this in StackOverflow, with no answer 😦 https://stackoverflow.com/questions/78832385/how-to-reuse-a-resource-infolist-method-in-another-resource-in-laravel-filament
Stack Overflow
How to reuse a Resource infoList method in another Resource in Lara...
I'm working on a Laravel project using Filament. I have two models: User and Car. Each Car belongs to a specific User. I want to display user information on the Car page by using the infoList defin...
Solution
If you use a specific infolist setup in different places, you can create a reusable component to extract it.
Maybe this works (not tested)
For the record:
Thank you very much !