{{-- A figure such as "500+", "1M+" or "99.9%" that counts up when it scrolls into view (app.js). The text is printed in full, so it reads correctly without JavaScript. Usage: --}} @props(['value']) @php // prefix, number, suffix: "99.9%" -> ['', '99.9', '%']; "1M+" -> ['', '1', 'M+'] preg_match('/^(\D*?)(\d[\d.,]*)(.*)$/u', (string) $value, $part); $number = isset($part[2]) ? (float) str_replace(',', '', $part[2]) : null; @endphp {{ $value }}