krkmo
Adding model data to the chart property of the stat component
protected function getStats(): array
{
return [
Stat::make('Students', Student::where('active', true)->count())
->label(__('Students'))
->color('success')
->chart($this->getData())
->icon('mdi-account-school')
->description(__('Total students'))
];
}
6 replies