> laravel-custom-helpers

Create and register small, pure helper functions when they improve clarity; keep them organized and tested

fetch
$curl "https://skillshub.wtf/noartem/skills/laravel-custom-helpers?format=md"
SKILL.mdlaravel-custom-helpers

Custom Helpers

Create a helper file

// app/Support/helpers.php
function money(int $cents): string { return number_format($cents / 100, 2); }

Autoload

Add to composer.json:

{
  "autoload": { "files": ["app/Support/helpers.php"] }
}

Run composer dump-autoload.

Guidelines

  • Keep helpers small and pure; avoid hidden IO/state
  • Prefer static methods on value objects when domain-specific

┌ stats

installs/wk0
░░░░░░░░░░
first seenMar 17, 2026
└────────────

┌ repo

noartem/skills
by noartem
└────────────

┌ tags

└────────────