Widget blade, white screen
I've seen another post in here but it didn't solve my issue, been trying for a while...
this is my blade (
php
This is my PropertyStats class (App\Livewire):
php
and of course the widget is being called in the panel:
php
What shows in the console is an error 500 and the dashboard turns to a white screen.
this is my blade (
resources/views/filament/widgets/property-stats.blade.phpresources/views/filament/widgets/property-stats.blade.php):<x-filament-widgets::widget>
<x-filament::section>
<div>
@livewire(\App\Livewire\PropertyStats::class)
</div>
</x-filament::section>
</x-filament-widgets::widget><x-filament-widgets::widget>
<x-filament::section>
<div>
@livewire(\App\Livewire\PropertyStats::class)
</div>
</x-filament::section>
</x-filament-widgets::widget>This is my PropertyStats class (App\Livewire):
<?php
namespace App\Livewire;
use Filament\Widgets\StatsOverviewWidget as BaseWidget;
use Filament\Widgets\StatsOverviewWidget\Stat;
class PropertyStats extends BaseWidget
{
protected static string $view = 'filament.widgets.property-stats';
protected static ?string $pollingInterval = null;
protected int | string | array $columnSpan = '6';
protected function getColumns(): int
{
return 3;
}
protected function getStats(): array
{
return [
Stat::make('Regions', '9')
->icon('heroicon-o-map')
->extraAttributes([
'class' => 'cursor-pointer',
// 'wire:click' => "\$dispatch('setStatusFilter', { filter: 'processed' })",
]),
Stat::make('Projects', '3')
->icon('heroicon-o-newspaper'),
Stat::make('Sub Projects', '2')
->icon('heroicon-o-newspaper'),
Stat::make('Total Properties', '131')
->icon('heroicon-o-home-modern'),
Stat::make('Total Properties', '131')
->icon('heroicon-o-home-modern'),
];
}
}<?php
namespace App\Livewire;
use Filament\Widgets\StatsOverviewWidget as BaseWidget;
use Filament\Widgets\StatsOverviewWidget\Stat;
class PropertyStats extends BaseWidget
{
protected static string $view = 'filament.widgets.property-stats';
protected static ?string $pollingInterval = null;
protected int | string | array $columnSpan = '6';
protected function getColumns(): int
{
return 3;
}
protected function getStats(): array
{
return [
Stat::make('Regions', '9')
->icon('heroicon-o-map')
->extraAttributes([
'class' => 'cursor-pointer',
// 'wire:click' => "\$dispatch('setStatusFilter', { filter: 'processed' })",
]),
Stat::make('Projects', '3')
->icon('heroicon-o-newspaper'),
Stat::make('Sub Projects', '2')
->icon('heroicon-o-newspaper'),
Stat::make('Total Properties', '131')
->icon('heroicon-o-home-modern'),
Stat::make('Total Properties', '131')
->icon('heroicon-o-home-modern'),
];
}
}and of course the widget is being called in the panel:
->widgets([
PropertyStats::class,
])->widgets([
PropertyStats::class,
])What shows in the console is an error 500 and the dashboard turns to a white screen.
