Unable to find component: [] in Custom Dashboard
I've follow https://filamentphp.com/docs/2.x/admin/dashboard/getting-started#customizing-the-dashboard-page and I create my own dashboard page.
Now I want to display some stats and I follow this
https://filamentphp.com/docs/2.x/admin/dashboard/stats#getting-started and using this link I try to display my widgets https://filamentphp.com/docs/2.x/admin/pages/widgets and put inside
getHeaderWidgets()
But I got error Unable to find component: []
What should be gone wrong?
Edit:
After using getHeaderWidgets()
the error come, If I don't use then I can see my page without error7 Replies
I don't know if it will help, but in your config filament.php, you have the widgets there, maybe you have to put them there for him to identify them and use them in that function.
but it shouldn't be necessary to do this by logic
If I include inside config then the error is gone, but my stats cannot display in Dashboard page..
getHeaderWidgets()
and getFooterWidgets()
seem not workingdid you do the function this way?
protected function getHeaderWidgets(): array
{
return [yorwidget];
}
Yes.. let me check in other custom pages
My bad, import wrong class.. π I need to sleep
hahaha this happens a lot xD
Thanks for your help @yuut4
I didn't help much but thanks, stick with it