F
Filament17mo ago
Noor

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
Patrick Boivin
Patrick Boivin17mo ago
You can use as many widgets as you want in your pages. Are you running into any issues?
Noor
NoorOP17mo ago
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
Patrick Boivin
Patrick Boivin17mo ago
Are you using getHeaderWidgets() to add widgets to specific pages?
Noor
NoorOP17mo ago
no I'm not using header widget ... I'm using dashboard class in which I'm calling widgets using function getWidgets() @pboivin
Patrick Boivin
Patrick Boivin17mo ago
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.
Noor
NoorOP17mo ago
so then after doing that .. would I able to see all cards seperatly for each resource on dashboard ? @pboivin
Patrick Boivin
Patrick Boivin17mo ago
Oh, you want to group the widgets but all on the Dashboard page?
Noor
NoorOP17mo ago
yes I'm using a custom dashboard @pboivin
Patrick Boivin
Patrick Boivin17mo ago
Ok, good! So I think you will need to customize the Blade view a bit.
Noor
NoorOP17mo ago
but how I'll split them ? @pboivin
Patrick Boivin
Patrick Boivin17mo ago
Yes, that's it Do you know how to customize the view for your Dashboard page?
Noor
NoorOP17mo ago
creating blade file in resource/view I guess? 🫣
Patrick Boivin
Patrick Boivin17mo ago
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.
Noor
NoorOP17mo ago
ohhhhhhhhh okay
Patrick Boivin
Patrick Boivin17mo ago
You see where I'm going? lol
Noor
NoorOP17mo ago
yes I'm gonna try that now thankyou so much
Want results from more Discord servers?
Add your server