I want to hide 2 widgets out of 4 from my resource page on dashboard, is it possible to do that?

Hello all, I have total of 4 widgets on my resource page, I want just 2 widgets to get displayed on the dashboard. Is it possible to achieve? Thanks in advance.
No description
5 Replies
leoPascal
leoPascal8mo ago
thanks for your reply @Leandro Ferreira I tried like this because ->isAdmin gives me error. But this canView() hide all 4 widgets from the dashboard & resource page aswell.
public static function canView():bool
{
if(\auth()->user()->can('show_widgets')){
return true;
}
else{
return false;
}
}
public static function canView():bool
{
if(\auth()->user()->can('show_widgets')){
return true;
}
else{
return false;
}
}
I actually want to show all 4 widgets on my resource page and show only 2 on dashboard.
LeandroFerreira
LeandroFerreira8mo ago
The current project shows all of them in the Dashboard and the page resource?
leoPascal
leoPascal8mo ago
Appologies for late reply! Yes all 4 widgets getting getting displaying, both on the dashboard and the resource page.