New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

rappasoft/laravel-helpers

Laravel Helpers for Non-Laravel Projects
716,969 277
Install
composer require rappasoft/laravel-helpers
Latest Version:v3.0.2
PHP:^8.1
License:MIT
Last Updated:Oct 9, 2026
Links: GitHub  ·  Packagist
Maintainer: rappa819

Package Logo

Laravel Helpers for Non-Laravel Projects

Latest Version on Packagist Total Downloads Tests PHP Version

This project takes the useful Laravel helper functions and allows you to use them in Non-Laravel projects. Updated for compatibility with Laravel 10, 11, and 12.

Enjoying this package? Buy me a beer 🍺

Requirements

  • PHP 8.1 or higher
  • PHP extensions: ctype and mbstring
  • Composer

Installation

composer require rappasoft/laravel-helpers

Quick Start

Once installed, all helper functions are automatically available:

<?php

require 'vendor/autoload.php';

// String helpers
$slug = str_slug('Hello World'); // "hello-world"
$plural = str_plural('user', 2); // "users"
$masked = str_mask('1234567890', '*', 3, 4); // "123****890"

// Array helpers
$value = array_get($data, 'user.profile.name', 'Default');
$hasKey = array_has($data, 'user.email');
$first = array_key_first($array);

// General helpers
if (blank($value)) {
    // Handle empty value
}

$result = transform($value, function ($v) {
    return strtoupper($v);
}, 'default');

Documentation and Usage Instructions

See the documentation for detailed installation and usage instructions.

Testing

This package includes comprehensive tests using PHPUnit. To run the tests:

# Install dependencies
composer install

# Run all tests
vendor/bin/phpunit

# Run specific test suite
vendor/bin/phpunit tests/HelpersTest.php
vendor/bin/phpunit tests/StringsTest.php
vendor/bin/phpunit tests/ArraysTest.php

See tests/README.md for more testing information.

License

Since the Laravel framework is open-sourced software licensed under the MIT license, this project is licensed under the same license.

Related Packages

aurion72/helpers

Aurion72 Helpers

14,872 0
xnxk/helpers

Provides backwards compatibility for helpers in the XNXK Tech.

11,896 0
velcoda/helpers

Your Package Description here

4,997
mossengine/helper

PHP Class that streamlines usages of static method helpers without needing to lo...

1,852 0
laravel/helpers

Provides backwards compatibility for helpers in the latest Laravel release.

69,735,849 809

Version History

Version Released PHP License
v3.0.2 ^8.1 MIT
v3.0.1 ^8.1 MIT
v3.0.0 ^8.1 MIT
v2.1.0 ^7.3|^8.0 MIT
v2.0.0 ^7.3|^8.0 MIT