PHPackages                             bitvalencia/laravel-helpers - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. bitvalencia/laravel-helpers

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

bitvalencia/laravel-helpers
===========================

Global helpers for Laravel projects

5.0.0(11mo ago)03021MITPHPPHP ^8.2CI failing

Since Jul 6Pushed 11mo ago1 watchersCompare

[ Source](https://github.com/bitvalencia/laravel-helpers)[ Packagist](https://packagist.org/packages/bitvalencia/laravel-helpers)[ Docs](https://github.com/bitvalencia/laravel-helpers)[ RSS](/packages/bitvalencia-laravel-helpers/feed)WikiDiscussions main Synced yesterday

READMEChangelog (7)Dependencies (6)Versions (8)Used By (0)

Laravel Helpers
===============

[](#laravel-helpers)

Global helpers for Laravel projects

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require bitvalencia/laravel-helpers
```

Usage
-----

[](#usage)

**carbon**

Shortcut for: `new Carbon` or `Carbon::parse()`

```
carbon('1 year ago');
```

**user**

A shortcut for `auth()->user()`

```
user()->posts()->create([...]);
```

**ok**

Returns an HTTP 204 response (OK, No Content).

```
return ok();
```

**fail\_validation**

Returns an HTTP 422 response (Validation Error).

```
fail_validation('key', 'message');
```

**dump\_sql**

Returns sql query with bindings data.

```
dump_sql(\DB::table('users')->where('email', "blaBla")->where('id', 1));
// returns "select * from `users` where `email` = 'blaBla' and `id` = 1"
```

**faker**

Shortcut for: $faker = Faker\\Factory::create()

```
faker()->address; // returns random, fake address
faker('address'); // alternate syntax
```

**stopwatch**

Returns the amount of time (in seconds) the provided callback took to execute. Useful for debugging and profiling.

```
stopwatch(function () {
    sleep(2);
}); // returns "2.0"
```

**str\_between**

```
str_between('--thing--', '--'); // returns "thing"
str_between('[thing]', '[', ']'); // returns "thing"

Str::between('--thing--', '--'); // returns "thing"
Str::between('[thing]', '[', ']'); // returns "thing"
```

**money**

```
echo money(12); // echoes "$12.00"
echo money(12.75); // echoes "$12.75"
echo money(12.75, false); // echos "$13"
echo money(12.75, true, 'en_GB'); // echos "£12.75"
```

Note: unless specified otherwise, money() will detect the current locale.

**str\_wrap**

```
str_wrap('thing', '--'); // returns "--thing--"

Str::wrap('thing', '--'); // returns "--thing--"
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance50

Moderate activity, may be stable

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~297 days

Recently: every ~424 days

Total

7

Last Release

349d ago

Major Versions

1.2.0 → 2.0.02021-02-07

2.0.0 → 3.02021-07-14

3.0 → 4.02023-02-21

4.0 → 5.0.02025-05-28

PHP version history (5 changes)1.0.0PHP ^7.4

2.0.0PHP ^7.4|^8.0

3.0PHP ^8.0

4.0PHP ^8.1

5.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/407d8a5bb1854581a47e4f38b4978e842eeb8de22058d185d33b14fe2ff37e0f?d=identicon)[IvanG11](/maintainers/IvanG11)

---

Top Contributors

[![IvanG11](https://avatars.githubusercontent.com/u/1247325?v=4)](https://github.com/IvanG11 "IvanG11 (14 commits)")

---

Tags

laravelhelperslaravel-helpersbitvalencia

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/bitvalencia-laravel-helpers/health.svg)

```
[![Health](https://phpackages.com/badges/bitvalencia-laravel-helpers/health.svg)](https://phpackages.com/packages/bitvalencia-laravel-helpers)
```

###  Alternatives

[akaunting/laravel-money

Currency formatting and conversion package for Laravel

7825.3M18](/packages/akaunting-laravel-money)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[wearepixel/laravel-cart

A cart implementation for Laravel

1310.5k](/packages/wearepixel-laravel-cart)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
