5 Replies
You can't. Modals don't support widgets.
thanks for this @Dennis Koch
one last question for today is:
can I prevent to go to a certain page when a certain model in DB has no records?
eg: I have a Post model and Comment model
Post has Many Comments
I want to prevent to go to comments/create while Post::count() == 0;
Thank you!
you can add widgets above the table, by putting them in getHeaderWidgets() on the manage page
but not inside modals
It failed... I don't know why!
@lambertn33 you can put widgets in a modal with custom code in a resource (not sure about a simple resource, haven't tested that). I had to do a similar thing. I made a custom action in my resource:
Then I made that blade view with this content: