laravel-custom-helpers

star 136

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

jpcaparas By jpcaparas schedule Updated 11/3/2025

name: laravel:custom-helpers description: Create and register small, pure helper functions when they improve clarity; keep them organized and tested

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
Install via CLI
npx skills add https://github.com/jpcaparas/superpowers-laravel --skill laravel-custom-helpers
Repository Details
star Stars 136
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator