Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Helpers

Laravel Helpers Laravel Package

rappasoft/laravel-helpers

rappasoft/laravel-helpers offers a practical collection of helper functions and classes for Laravel, including utilities for arrays, strings, dates, numbers, URLs, and more. It helps reduce repetitive boilerplate and speed up everyday application development.

View on GitHub
Deep Wiki
Context7

Laravel 8 Helper function for Non-Laravel Projects

Frequently asked questions about Laravel Helpers
How do I install rappasoft/laravel-helpers?
Install it with composer require rappasoft/laravel-helpers. The package is an autoload-files utility, so Composer registers its global helper functions automatically and there is no publish step, service provider, config file, or migration to run. Just make sure your runtime has PHP 8.1 or newer with the ctype and mbstring extensions enabled.
Does rappasoft/laravel-helpers work in non-Laravel PHP projects?
Yes. The package has zero framework coupling and exposes plain global helper functions rather than classes, facades, or service providers, so it runs fine in standalone Composer projects. That also makes it safe to use inside shared libraries that must work both inside and outside a Laravel application. You still need PHP 8.1+ with ctype and mbstring.
Which PHP and Laravel versions are supported by rappasoft/laravel-helpers?
The hard requirement is PHP 8.1 or newer with the ctype and mbstring extensions. The package itself is framework-agnostic, and the recommended stack fit is Laravel 9 through 12 running on PHP 8.1 to 8.5. Pin the dependency to ^3.0.2 rather than floating on ^3.0 so you get the latest behavioral fixes.
What happens with array_first and array_last on PHP 8.5?
PHP 8.5 ships native array_first(array $array) and array_last(array $array) functions with single-argument signatures, while this package's versions accept a callback and a default value. That means identical source code behaves differently depending on the PHP minor version, and it is a silent behavioral break rather than a fatal error. Before upgrading to PHP 8.5, rewrite affected call sites using the documented replacements: array_value_first(array_where($items, $callback), $default) and array_value_last(array_where($items, $callback), $default). The rewrite is mechanical and greppable, so it is cheap if done proactively.
Will rappasoft/laravel-helpers conflict with Laravel's built-in helper functions or laravel/helpers?
There is a real collision risk because array_first, array_last, retry, and value also exist in Illuminate/Support/helpers.php and in the official laravel/helpers package. Two unguarded definitions of the same global function cause a boot-time fatal error, so verify whether the definitions are wrapped in function_exists() guards and confirm which package loads first. Run a dependency audit before adoption, especially if laravel/helpers is already co-installed.
What changed in version 3.0.2 of rappasoft/laravel-helpers?
Version 3.0.2 changes retry() attempt counts and delay-callback arguments, alters value() closure argument forwarding, and modifies array_forget() and array_except() deletion semantics. These are labeled fixes, but retry() attempt counting can affect job or HTTP retry behavior and array_forget() can change how config or payload data is manipulated. Pin ^3.0.2 deliberately and run your full application test suite to surface any behavioral delta before deploying.
Do I need to register a service provider or publish config for this package?
No. rappasoft/laravel-helpers registers its helpers through Composer's autoload files entry, so there is nothing to wire into the container and no config or migration surface. Installation is just composer require plus confirming the required PHP extensions. That low friction is the main integration benefit, but it also means the global function namespace is your only integration point.
What PHP extensions does rappasoft/laravel-helpers require and why does it matter in Docker?
The package requires the ctype and mbstring extensions alongside PHP 8.1 or newer. Both are commonly compiled into standard PHP builds but are frequently omitted from minimal or Alpine-based container images, which turns extension verification into a genuine checklist item. Confirm both are present in every runtime image before deploying.
How do I migrate away from callback-based array_first calls before a PHP 8.5 upgrade?
Inventory every call site that passes a callback or default to array_first or array_last, since that is the exact PHP 8.5 breakage set. Replace them with $first = array_value_first(array_where($items, $callback), $default) and $last = array_value_last(array_where($items, $callback), $default). The substitutions are mechanical and codemod-friendly, so the migration is inexpensive when planned rather than discovered through a production incident.
What are the alternatives to rappasoft/laravel-helpers?
Inside a Laravel application you already have the framework helpers in Illuminate/Support/helpers.php, and the official laravel/helpers package provides similar legacy functions. For standalone projects you can rely on native PHP 8.5 functions or Symfony polyfills for specific gaps. If you keep rappasoft/laravel-helpers, verify function_exists() guards and load order so you do not double-define global symbols.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core