# Laravel:custom Helpers

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

- Skill: `jpcaparas/laravel-custom-helpers` (Agent Skill)
- Install (CLI): `npx skillmds@latest add jpcaparas/laravel-custom-helpers`
- Raw SKILL.md: https://api.skillmd.com/api/skills/jpcaparas/laravel-custom-helpers/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: jpcaparas (https://skillmd.com/u/jpcaparas)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/jpcaparas/laravel-custom-helpers

---


# Custom Helpers

## Create a helper file

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

## Autoload

Add to `composer.json`:

```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


