FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
I built a fluent Numberable API for Laravel (v1.0.0)
How-ToWeb Development

I built a fluent Numberable API for Laravel (v1.0.0)

via Dev.toTresor1mo ago

Laravel has Stringable for strings, but numeric logic in apps often still looks messy. I just released laravel-numberable v1.0.0 : a small package for fluent numeric operations and formatting in Laravel. Why Numbers in apps usually need more than + and - : parsing user input currency / percentage formatting rounding comparisons business rule helpers I wanted something chainable and expressive. Install composer require tresor-kasenda/laravel-numberable Example $price = number ( 1999.99 ) -> withLocale ( 'en_US' ) -> withCurrency ( 'USD' ); $price -> asCurrency (); Fluent math $total = number ( 120 ) -> add ( 30 ) -> multiply ( 1.2 ) -> round ( 2 ); Utilities number ( 15 ) -> clamp ( 0 , 10 ); // 10 number ( 10.0 ) -> trim (); // 10 number ( 17 ) -> isPrime (); // true number ( 12 ) -> isEven (); // true number ( 10 ) -> between ( 5 , 15 ); // true Formatting number ( 0.157 ) -> asPercentage (); number ( 1532000 ) -> asAbbreviated (); number ( 1048576 ) -> asFileSize (); number ( 21 ) ->

Continue reading on Dev.to

Opens in a new tab

Read Full Article
36 views

Related Articles

Instacart Promo Code: Save on Groceries in March 2026
How-To

Instacart Promo Code: Save on Groceries in March 2026

Wired • 3d ago

How a Switch Actually “Learns”: Demystifying MAC Addresses and the CAM Table
How-To

How a Switch Actually “Learns”: Demystifying MAC Addresses and the CAM Table

Medium Programming • 3d ago

This is the lowest price on a 64GB RAM kit I've seen in months
How-To

This is the lowest price on a 64GB RAM kit I've seen in months

ZDNet • 4d ago

What Is Computer Science? (Learn This Before It’s Too Late)
How-To

What Is Computer Science? (Learn This Before It’s Too Late)

Medium Programming • 4d ago

How to Build Your Own Claude Code Skill
How-To

How to Build Your Own Claude Code Skill

FreeCodeCamp • 4d ago

Discover More Articles