Expecto Patronum
Set Dark Mode For Individual User ?
sorry for the confusion . My question is how to let user can set their own theme from default filament theme mode . Because right now . filament have dark mode. so imagine i have few user . so every user can set their own mode to set light or dark mode for their own account .
9 replies
PlaceHolder Form Component in Infolist Section
because i want to achieve to count attribute from relation manager in owner resource . i already try implement with placeholder . its working but i want to use infolist . so searching other way in infolist same as placeholder . Below is my code .
in my owner resource form :
Forms\Components\Placeholder::make('payments_count')
->label('Jumlah Keseluruhan Bayaran')
->content(function (PaymentLog $record) {
return new HtmlString("
<table style='width: 100%;'>
<tr>
<td><strong>Jumlah:</strong></td>
<td> RM " . number_format($record->totalAmount(), 2) . "</td>
</tr>
</table>
");
})
in my model :
public function paymentLogItem()
{
return $this->hasMany(PaymentLogItem::class);
}
public function totalAmount(): int
{
return $this->paymentLogItem->sum('amount');
}
in my relation manager form :
textinput::make('amount')
7 replies