@props(['value', 'compact' => false, 'showCurrency' => true, 'signed' => false]) {{-- Renders an amount with tabular figures so columns line up, and marks the sign in colour only where a sign carries meaning. --}} @php use App\Support\MoneyFormatter; $text = $compact ? MoneyFormatter::compact($value, $showCurrency) : MoneyFormatter::format($value, $showCurrency); $tone = ''; if ($signed) { $tone = $value->isNegative() ? ' money--negative' : ($value->isPositive() ? ' money--positive' : ''); } @endphp merge(['class' => 'money'.$tone]) }} title="{{ MoneyFormatter::accessible($value) }}">{{ $text }}