Stats card
Can I put multiple cards under each resource .. because I'm using a lot of cards and I want them to organize multiple cards into there suitable resource
17 Replies
You can use as many widgets as you want in your pages. Are you running into any issues?
No I'm not having any issue ... I just wanna try if we can split the cards for each resource... for instance if there is a client resource wrap there cards in one block and if there is prospects then wrap them differently @pboivin
Are you using
getHeaderWidgets()
to add widgets to specific pages?no I'm not using header widget ... I'm using dashboard class in which I'm calling widgets using function getWidgets()
@pboivin
Ok. If you want to add widgets to specific resources, you can use
getWidgets()
on the resource class directly. And you can use getHeaderWidgets()
on specific pages also.so then after doing that .. would I able to see all cards seperatly for each resource on dashboard ? @pboivin
Oh, you want to group the widgets but all on the Dashboard page?
Did you create a custom Dashboard?
https://filamentphp.com/docs/2.x/admin/dashboard/getting-started#customizing-the-dashboard-page
yes I'm using a custom dashboard
@pboivin
Ok, good! So I think you will need to customize the Blade view a bit.
but how I'll split them ?
@pboivin
Yes, that's it
Do you know how to customize the view for your Dashboard page?
creating blade file in resource/view I guess?
🫣
Yep. You can take the original view from Filament, in
vendor
. Copy it in your project and check in it. You'll see how the widgets are rendered.ohhhhhhhhh okay
You see where I'm going? lol
yes
I'm gonna try that now
thankyou so much