ryangjchandler/laravel-helpers
A lightweight collection of practical helper functions for Laravel and PHP. It fills common gaps with small, reusable utilities that reduce boilerplate, simplify everyday tasks, and keep application code clean and readable. A handy companion for developers wanting expressive shortcuts without extra...
composer require ryangjchandler/laravel-helpers, then run composer dump-autoload. The package is a bag of global functions, so there is typically no service provider to register, no config to publish, and no facade to alias — the composer.json files autoload entry does all the work.composer show ryangjchandler/laravel-helpers --all and compare the release date (2024-09-20) and PHP/Laravel constraints against your app. If you're on a newer Laravel major, expect to verify manually rather than rely on CI.src/helpers.php) — that file is the documentation. Read it top to bottom, note the function names and their exact semantics (especially anything touching config(), app(), or dates), and skim the README for the author's intended usage.use statements, no constructor injection, no container resolution. That's the appeal and also the coupling risk.@php block feels heavy. Helpers that format output (strings, numbers, dates) slot in cleanly inside {{ }}.App\Support\Helpers class or a set of named app-level functions. When the package goes stale (it's archived) you can reimplement behind the same surface without touching call sites.app/Support/helpers.php, autoload that file via composer.json files, and remove the dependency. You keep the ergonomics and lose the abandoned-package risk.composer.json (e.g. "1.0.0" rather than "^1.0") so a future composer resolution can't pull a tag you haven't reviewed.function_exists() guards, which means a collision with your own helper or another package fails silently — you get the other implementation, not a fatal. Grep your codebase and vendor/ for the function names before adopting.files autoload. The cost is negligible in practice, but it's worth knowing there's no lazy loading and no way to opt out of unused helpers.vendor/'s autoloaded files. Add the helpers file to your scanFiles (PHPStan) or stubs/ignoreFiles config so calls type-check instead of erroring as undefined._ide_helper-style file; if not, a one-line stub file in your project (or a @method docblock wrapper) is usually enough.vendor/composer/autoload_files.php and re-run composer dump-autoload -o. If it's missing, the install didn't complete or composer.json autoload was altered.How can I help you explore Laravel packages today?