Make Laravel development faster, cleaner, and more productive. Laravel HelperBox ships 600+ high-quality helper functions across arrays, strings, dates, Blade, Eloquent/database, caching, HTTP/APIs, security, math/algorithms, data science, geo utilities, frontend optimizations, system monitoring, and more.
Built for modern Laravel (9β12), fully framework-native, no macros or monoliths β just handy, well-named functions you can drop into any project.
- 600+ unique helpers not in PHP or Laravel core
- Organized into focused categories in
src/Helpers
- Autoloaded via
HelperServiceProvider
β zero setup - Production-ready: caching, DB utilities, security, performance, analytics
composer require subhashladumor/laravel-helperbox
Laravel auto-discovers the provider: Subhashladumor\LaravelHelperbox\HelperServiceProvider
.
// Arrays
$flat = array_flatten_recursive([[1, [2]], 3]); // [1, 2, 3]
// Strings
$slug = str_slugify('Hello, Laravel HelperBox!'); // "hello-laravel-helperbox"
// Cache
$value = cache_with_jitter('dashboard:data', 300, 15, fn () => fetchExpensive());
// DB (detect N+1)
$report = db_detect_n_plus_one(User::query(), ['posts', 'roles']);
// HTTP
$json = http_get_json('https://api.github.com');
See full category documentation in the docs below.
Each helper group lives in src/Helpers/<HelperFile>.php
. Explore documentation per category:
- ArrayHelpers
- StringHelpers
- MathHelpers
- BladeHelpers
- ModelDatabaseHelpers
- FilePathHelpers
- MemorySystemHelpers
- ControllerRepositoryHelpers
- DateTimeHelpers
- CacheSessionHelpers
- ApiHttpHelpers
- ValidationHelpers
- AdvancedAlgorithmHelpers
- AdvancedStringParsingHelpers
- AdvancedMathAlgorithmicHelpers
- AdvancedLaravelDatabaseHelpers
- JsStyleHelpers
- AdvancedCacheHelpers
- FileStreamingHelpers
- SystemMonitoringOptimizationHelpers
- SecurityAuthHelpers
- AdvancedDeveloperHelpers
- ThirdPartyApiHelpers
- SqlOptimizationHelpers
- DataScienceAnalyticsHelpers
- FrontendOptimizationHelpers
- GeoHelpers
Total helpers: 600+ (and growing)
All categories link to docs/<HelperFile>.md
. Each page includes:
- Overview and when to use
- Function index with signatures
- Usage examples and tips
If you prefer browsing code, see src/Helpers/
β every function is wrapped in function_exists
guards and can be called directly.
Contributions are welcome! Fixes, docs, tests, and new helpers are appreciated.
- Fork and create a feature branch
- Add or update helpers in
src/Helpers/
- Include concise PHPDoc blocks and guard with
function_exists
- Add usage examples to the corresponding
docs/<HelperFile>.md
- Open a PR with a clear description
MIT Β© Subhash Ladumor
Made with β€οΈ for the Laravel community