Number::abbreviate()
Format large numbers into human-readable abbreviations like "1K", "2.5M", or "3B" with locale support.
Useful methods buried deep in the framework that most developers never discover.
Format large numbers into human-readable abbreviations like "1K", "2.5M", or "3B" with locale support.
Create a sliding window of overlapping chunks from a collection — perfect for moving averages, comparisons, and sequential analysis.
Remove a specific prefix or suffix from a string only if it is present — no regex, no conditionals.
Return a Stringable directly from a route and Laravel will render it as an HTTP response — no explicit conversion needed.
Apply a callback to every element in an array (including nested arrays) without converting to a Collection first.
Generate a time-limited, signed URL to a private file — grant temporary access without making the file public.
Send notifications to recipients who aren't users — email addresses, phone numbers, or Slack channels — without a Notifiable model.
Override UUID generation in tests with predictable values — make your tests deterministic without mocking.
Pass an entire collection into a class constructor — transform collection pipelines into domain objects in a single call.