Hi, does anyone know how to add a break-line in StatsOverview Widget?

in the ->description()
Stat::make('User Analytics', $totalUsers)
->description(
<<<HTML
Active: $activeUsers ({$this->getActivePercentage($activeUsers, $totalUsers)}%)<br>
Inactive: $inactiveUsers ({$this->getInactivePercentage($inactiveUsers, $totalUsers)}%)
HTML
)
->descriptionIcon('heroicon-m-users')
->chart($userGrowth->pluck('aggregate')->toArray())
->color('primary'),
Stat::make('User Analytics', $totalUsers)
->description(
<<<HTML
Active: $activeUsers ({$this->getActivePercentage($activeUsers, $totalUsers)}%)<br>
Inactive: $inactiveUsers ({$this->getInactivePercentage($inactiveUsers, $totalUsers)}%)
HTML
)
->descriptionIcon('heroicon-m-users')
->chart($userGrowth->pluck('aggregate')->toArray())
->color('primary'),
Solution:
oh... try like this ->description(new HtmlString('Active<br>Inactive'))
Jump to solution
4 Replies
Vp
Vp4mo ago
I think you can wrap in <div> or <p> tag like <div>Active</div>
Rolland
RollandOP4mo ago
I have tried that this is the result
No description
Solution
Vp
Vp4mo ago
oh... try like this ->description(new HtmlString('Active<br>Inactive'))
Rolland
RollandOP4mo ago
thank you it is working now.
Want results from more Discord servers?
Add your server