How to expose method to set variable on widget in dashboard class
So, essentially I've created a widget to display a headline on a dashboard.
I wan't to be able to define the headline to display directly from the included widget class in the getWidgets() method in the dashboard class.
I've tried the following: https://gist.github.com/ph1llips/fd99586b14dfba6d3921d9f1ee67b875
I do however get the following error: "Declaration of App\Livewire\Headline::make(array $properties = []): static must be compatible with Filament\Widgets\Widget::make(array $properties = []): Filament\Widgets\WidgetConfiguration
I basically just wan't to be able to do something like:
Headline::make()
->text('Headline goes here');
0 Replies