PHPackages                             henrotaym/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. henrotaym/laravel-helpers

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

henrotaym/laravel-helpers
=========================

A kit of laravel helpers.

v2.0.2(2mo ago)07.7k↓33.3%4MITPHPCI passing

Since Sep 28Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/henrotaymcorp/laravel-helpers)[ Packagist](https://packagist.org/packages/henrotaym/laravel-helpers)[ RSS](/packages/henrotaym-laravel-helpers/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (7)Dependencies (3)Versions (14)Used By (4)

Laravel helpers
===============

[](#laravel-helpers)

A kit of usefull helpers accessible via a facade.

Compatibility
-------------

[](#compatibility)

LaravelPackage8.x / 9.x1.x12.x2.xInstallation
------------

[](#installation)

```
composer require henrotaym/laravel-helpers

```

Access the facade
-----------------

[](#access-the-facade)

```
use Henrotaym/LaravelHelpers/Facades/Helpers;

```

Available methods
-----------------

[](#available-methods)

### Try

[](#try)

```
/**
* Trying to execute given callback with given args.
*
* @param callable $callback function to try.
* @param mixed $args arguments to give to callback.
* @return array First element is error (if any), second is response(if no error).
*/

public function try(callable $callback, ...$args): array;

```

### Optional

[](#optional)

```
/**
 * Trying to access nested property.
 *
 * @param object $element
 * @param string|array $nested_properties Nested properties. Methods should be like ['method_name' => [$arg1, $arg2]] OR method_name() if it doesn't need arguments.
 * @return Illuminate\Support\Optional Nullable nested property.
 */
public function optional(object $element, ...$nested_properties): Illuminate\Support\Optional

```

### doIfJobIsInstanceOf

[](#doifjobisinstanceof)

```
/**
 * Executing given callback if serialized job is instance of given element.
 *
 * @param Job $job
 * @param mixed $instance_of Same parameter types as native php instanceof.
 * @param callable $callback It receives job instance as first parameter.
 * @return mixed Callback returned value or null if any error.
 */
public function doIfJobIsInstanceOf(Job $job, $instance_of, callable $callback);

```

### uuid

[](#uuid)

```
 /**
 * Creating unique uuid.
 *
 * @param bool $allow_dash Telling if dashes are allowed in created uuid.
 * @return string
 */
public function uuid(bool $allow_dash = false): string;

```

### str\_contains

[](#str_contains)

```
/**
 * Telling if given string contains given substring.
 *
 * @param string $haystack The string to search in.
 * @param string $needle The string to search for.
 * @return bool
 */
public function str_contains(string $haystack, string $needle);

```

### getDirectory

[](#getdirectory)

```
/**
 * Getting directory where the file is located.
 *
 * @param string $class
 * @return string|null Null if any error.
 */
public function getDirectory(string $class): ?string;

```

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance83

Actively maintained with recent releases

Popularity24

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 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 ~146 days

Recently: every ~372 days

Total

12

Last Release

84d ago

Major Versions

v1.6.1 → v2.0.02026-02-23

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/24230736?v=4)[Mathieu Henrotay](/maintainers/henrotaym)[@henrotaym](https://github.com/henrotaym)

---

Top Contributors

[![henrotaym](https://avatars.githubusercontent.com/u/24230736?v=4)](https://github.com/henrotaym "henrotaym (26 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

PHPackages © 2026

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