ded7978
How i can get my own data or id of item in widgets.
I put widgets in edit page. Now i have to take data from database or somwhere. $this->data doesnt work
class StatsOverview extends BaseWidget
{
protected function getStats(): array
{
return [
Stat::make('Sent', 'mydata'),
Stat::make('Delivered', '21%'),
Stat::make('Viewed', '3:12'),
];
}
}
4 replies