Certainly! The error message:
Class "App\Filament\Resources\Publications\PublicationResource\Widgets\SalesOverview" not found
…means PHP is looking for the SalesOverview widget inside the namespace:
App\Filament\Resources\Publications\PublicationResource\Widgets
However, based on your code, the widget is actually located here:
App\Filament\Resources\Publications\Widgets\SalesOverview
Solution
In your ViewPublication page, you must reference the correct namespace for SalesOverview. You have two options:
1. Add a use statement
At the top of your ViewPublication file, add:
use App\Filament\Resources\Publications\Widgets\SalesOverview;
Then, update your getFooterWidgets method like this:
protected function getFooterWidgets(): array
{
return [
SalesOverview::class,
];
}
2. Use the fully-qualified class name directly
If you prefer not to use a use statement, specify the full class path:
protected function getFooterWidgets(): array
{
return [
\App\Filament\Resources\Publications\Widgets\SalesOverview::class,
];
}
Recap
The issue is namespace reference:
You should reference Widgets\SalesOverview, not PublicationResource\Widgets\SalesOverview.
Bonus tip:
The Filament docs (with “CustomerResource\Widgets\SomeWidget”) assume Widgets lives under your Resource class, but you put your widgets as a sibling to the Resource class. So always double-check the exact namespace and directory organization for your widgets.
Let me know if you need help with something else!