F
Filament12mo ago
umair

how we set table Widgets permission using shield

i want when user give permission than Widgets display otherwise not display
3 Replies
ConnorHowell
ConnorHowell12mo ago
Your tags on the question (v3, Form builder & v2) are kinda confusing but assuming your using the latest version of filament then the below is what you want. https://filamentphp.com/docs/3.x/panels/dashboard#conditionally-hiding-widgets
umair
umairOP12mo ago
i'm using laravel shield package. i need according to shield package answer
ConnorHowell
ConnorHowell12mo ago
Do your own check in the canView method? Shield uses spatie’s permissions library under the hood so read the docs for that. I don’t know how you have it set up. If you return false from the method I linked it doesn’t show the widget, if you return true it does.
Want results from more Discord servers?
Add your server