New widget not working
Im using a new widget for a render hook and seeing this error:
Widget code:
Using $this when not in object contextUsing $this when not in object contextWidget code:
<x-filament-widgets::widget class="fi-filament-info-widget">
</x-filament-widgets::widget><x-filament-widgets::widget class="fi-filament-info-widget">
</x-filament-widgets::widget><?php
namespace App\Filament\Widgets;
use Filament\Widgets\Widget;
class Sidebar extends Widget
{
protected static string $view = 'filament.widgets.sidebar';
public array $actions = [];
public function mount(): void
{
$this->actions = [];
}
public function getColumnSpan(): int | string | array
{
return [];
}
public static function getSort(): int
{
return -1;
}
}<?php
namespace App\Filament\Widgets;
use Filament\Widgets\Widget;
class Sidebar extends Widget
{
protected static string $view = 'filament.widgets.sidebar';
public array $actions = [];
public function mount(): void
{
$this->actions = [];
}
public function getColumnSpan(): int | string | array
{
return [];
}
public static function getSort(): int
{
return -1;
}
}