F
Filament3mo ago
Zoltar

Use Resource Page for Dashboard

Hello, is it possible to use a resource as a dashboard page?
Solution:
Or just remove the Dashboard and make ActivityResource your first resource
Jump to solution
11 Replies
Dennis Koch
Dennis Koch3mo ago
You mean as the first page that opens? Just remove the Dashboard page I guess.
Zoltar
Zoltar3mo ago
yes but i add only custom page or can i use resource page? i read in tutorial that custom page need to extend 'class Dashboard extends \Filament\Pages\Dashboard'
Dennis Koch
Dennis Koch3mo ago
But you don't want a dashboard? Then just remove the Dashboard page
Zoltar
Zoltar3mo ago
yes man i created custom dashboard and its work, but my question is..can i use resource instead of custom page in my custom dashboard?
Dennis Koch
Dennis Koch3mo ago
What is a "Resource as a Dashboard" even supposed to be? Either it's a resource page with a table or it's a Dashboard page with Widgets.
Zoltar
Zoltar3mo ago
this is my custom page
namespace App\Filament\Pages;



class CustomDashboard extends \Filament\Pages\Dashboard
{
protected static string $view = 'filament.pages.employee-custom-dashboard';
}
namespace App\Filament\Pages;



class CustomDashboard extends \Filament\Pages\Dashboard
{
protected static string $view = 'filament.pages.employee-custom-dashboard';
}
is it possibile use this?
class CustomDashboard extends Resource {
}
class CustomDashboard extends Resource {
}
Dennis Koch
Dennis Koch3mo ago
No. A Resource is not a Page. What are you trying to do and why? Can you please explain?
Zoltar
Zoltar3mo ago
An admin creates a task list (Admin Panel) Users see a list of tasks after login. (Users Panel) My idea was to use the activity resource to show a grid and a view page it worked fine if I didn't want to use it on the home page (dashboard)
Dennis Koch
Dennis Koch3mo ago
Just use a table widget for the Dashboard then
Solution
Dennis Koch
Dennis Koch3mo ago
Or just remove the Dashboard and make ActivityResource your first resource
Zoltar
Zoltar3mo ago
thnks
Want results from more Discord servers?
Add your server