# Helpers

Entries tagged with "Helpers".

Hidden Methods Beginner

Number::abbreviate()

Format large numbers into human-readable abbreviations like "1K", "2.5M", or "3B" with locale support.

Helpers
Hidden Methods Beginner

Str::chopStart() & chopEnd()

Remove a specific prefix or suffix from a string only if it is present — no regex, no conditionals.

Helpers
Hidden Methods Beginner

The Stringable Interface in Responses

Return a Stringable directly from a route and Laravel will render it as an HTTP response — no explicit conversion needed.

Routing Helpers
Blade Tricks Intermediate

The @fragment Blade Directive

Define named fragments in your Blade templates and render only that fragment on demand — useful for partial updates and lazy loading.

HTTP Helpers
Hidden Methods Beginner

The Arr::map() Helper

Apply a callback to every element in an array (including nested arrays) without converting to a Collection first.

Collections Helpers
Blade Tricks Intermediate

The @persist Blade Directive

Keep a DOM element alive across Livewire page navigations — prevent re-rendering of video players, maps, or complex widgets.

Performance Helpers
Hidden Methods Intermediate

Notification::route()

Send notifications to recipients who aren't users — email addresses, phone numbers, or Slack channels — without a Notifiable model.

Helpers Notifications
Hidden Methods Advanced

Str::createUuidsUsing()

Override UUID generation in tests with predictable values — make your tests deterministic without mocking.

Testing Helpers
Hidden Methods Intermediate

Collection::pipeInto()

Pass an entire collection into a class constructor — transform collection pipelines into domain objects in a single call.

Collections Helpers