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

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

langleyfoxall/helpers-laravel
=============================

A collection of useful classes to help making Laravel applications easier

v4.0.0(4d ago)318.1k↓67.3%3[4 issues](https://github.com/langleyfoxall/helpers-laravel/issues)1LGPL-3.0-onlyPHPPHP ^8.3CI passing

Since May 24Pushed 4d ago6 watchersCompare

[ Source](https://github.com/langleyfoxall/helpers-laravel)[ Packagist](https://packagist.org/packages/langleyfoxall/helpers-laravel)[ Docs](https://github.com/LFSoftware/helpers-laravel)[ RSS](/packages/langleyfoxall-helpers-laravel/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (10)Dependencies (8)Versions (26)Used By (1)

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

[](#helpers-laravel)

[![Packagist](https://camo.githubusercontent.com/c3f782c7c0aa69ef60ed66d016320452f111c62172a5f9844691965ed8516b40/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c616e676c6579666f78616c6c2f68656c706572732d6c61726176656c2e737667)](https://packagist.org/packages/langleyfoxall/helpers-laravel/stats)

A repository of Laravel specific helper classes to help standardise work. API helpers, converters etc.

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

[](#installation)

The Langley Foxall Helpers Laravel package can be easily installed using Composer. Just run the following command from the root of your project.

```
composer require langleyfoxall/helpers-laravel
```

If you have never used the Composer dependency manager before, head to the [Composer website](https://getcomposer.org/) for more information on how to get started.

Helpers
-------

[](#helpers)

- [`Models`](#models)
- [`IsRelatedTo`](#isrelatedto)
- [`Enum`](#enum)
- [`ApiResponse`](#apiresponse)
- [`Response`](#response)
- [`ResponseCache`](#responsecache)
- [`IdentifiedByUUID`](#identifiedbyuuid)

### `Models`

[](#models)

The [Models helper](src/LangleyFoxall/Helpers/Models.php) offers helpful functions to do with [Eloquent Models](https://laravel.com/docs/eloquent).

#### Methods

[](#methods)

All methods can be called statically.

- [`all`](#all)
- [`utf8EncodeModel`](#utf8encodemodel)
- [`getColumns`](#getcolumns)
- [`getNextId`](#getnextid)
- [`areRelated`](#arerelated)
- [`randomByWeightedValue`](#randombyweightedvalue)

##### `all`

[](#all)

Get a [Collection](https://laravel.com/docs/collections) of all models.

###### Example Usage

[](#example-usage)

```
$collection_of_models = Models::all()

```

KeyDetailsParametersNoneThrowsNoneReturns[Collection](https://laravel.com/docs/collections)##### `utf8EncodeModel`

[](#utf8encodemodel)

Encodes attribute values of a single model to [UTF-8](https://tools.ietf.org/html/rfc3629), and returns the model.

###### Example Usage

[](#example-usage-1)

```
$encoded_user = Models::utf8EncodeModels($user)

```

KeyDetailsParameters[Model](https://laravel.com/docs/eloquent)ThrowsNoneReturns[Model](https://laravel.com/docs/eloquent)##### `utf8EncodeModels`

[](#utf8encodemodels)

Encodes attribute values of mutliple models to [UTF-8](https://tools.ietf.org/html/rfc3629), and returns a collection of model.

###### Example Usage

[](#example-usage-2)

```
$collection_of_encoded_users = Models::utf8EncodeModels($users)

```

KeyDetailsParametersA [Collection](https://laravel.com/docs/collections) of [Models](https://laravel.com/docs/eloquent)ThrowsNoneReturnsA [Collection](https://laravel.com/docs/collections) of [Models](https://laravel.com/docs/eloquent)##### `getColumns`

[](#getcolumns)

Get an [Array](http://php.net/manual/en/language.types.array.php) of the database columns for a given model.

###### Example Usage

[](#example-usage-3)

```
$columns = Models::getColumns($user)

```

KeyDetailsParameters[Model](https://laravel.com/docs/eloquent)ThrowsNoneReturns[Array](http://php.net/manual/en/language.types.array.php)##### `getNextId`

[](#getnextid)

Get the next [auto incremented ID](https://dev.mysql.com/doc/refman/8.0/en/example-auto-increment.html) for a model.

###### Example Usage

[](#example-usage-4)

```
$next_id = Models::getNextId($user)

```

KeyDetailsParameters[Model](https://laravel.com/docs/eloquent)Throws[Exception](http://php.net/manual/en/class.exception.php)Returns[Integer](http://php.net/manual/en/language.types.integer.php)##### `areRelated`

[](#arerelated)

Check if an *unspecificed* number of models are related to each other.

###### Example Usage

[](#example-usage-5)

If an instance of [Model](https://laravel.com/docs/eloquent) is passed, then `areRelated` will attempt to get a [plural](https://laravel.com/api/5.6/Illuminate/Support/Str.html#method_plural) then [singular](https://laravel.com/api/5.6/Illuminate/Support/Str.html#method_singular) method from the model that can then be used by the previous model in the sequence to confirm that they are related. If an array is passed, it expects the first element to be an instance of [Model](https://laravel.com/docs/eloquent) and the second to be a string which is the relationship method

A [`NotRelatedException`](src/LangleyFoxall/Helpers/Exceptions/NotRelatedException.php) is also provided to be used in an application.

```
$related = Models::areRelated($user, $post, [$comment, 'comments'])

```

KeyDetailsParametersMutliple [Models](https://laravel.com/docs/eloquent) or Mutliple [Array](http://php.net/manual/en/language.types.array.php)Throws[Exception](http://php.net/manual/en/class.exception.php) or [InvalidArgumentException](http://php.net/manual/en/class.invalidargumentexception.php)Returns[Boolean](http://php.net/manual/en/language.types.boolean.php)##### `randomByWeightedValue`

[](#randombyweightedvalue)

Takes a collection of `Model`'s and returns one based upon a weighted column. It can also take a maxCap to simulate higher odds.

It should be noted when passing a `maxCap` you should pass in a desired return value if none of the items in the models list were hit.

###### Example Usage

[](#example-usage-6)

```
$prizes = Prizes::all();
$selectedPrize = Models::randomByWeightedValue($models, 'chance');

```

```
//returns a prize as if the 'chance' column related to {$chance}/10,000,000 - if none are hit it will return null.
$selectedPrize = Models::randomByWeightedValue('App\Models\Prize', 'chance', 10000000, null);

```

KeyDetailsParametersA [Collection](https://laravel.com/docs/collections) of [Models](https://laravel.com/docs/eloquent) or a string representation of a [Model](https://laravel.com/docs/eloquent), `column`, `maxCap` = null, `ifLose` = nullThrowsNoneReturns[Model](https://laravel.com/docs/eloquent) or an `object`---

### `IsRelatedTo`

[](#isrelatedto)

The [IsRelatedTo helper](src/LangleyFoxall/Helpers/Traits/IsRelatedTo.php) is a trait that allows quick and easy access to the [`areRelated`](#arerelated) method in the [Models helper](src/LangleyFoxall/Helpers/Models.php).

#### Methods

[](#methods-1)

- [`isRelatedTo`](#isrelatedto-1)

##### `isRelatedTo`

[](#isrelatedto-1)

Check if a single model is related to the parent model.

###### Example usage

[](#example-usage-7)

```
class User extends Model {
    use IsRelatedTo;
}

$related = $user->isRelatedTo($post)

```

KeyDetailsParameters[Model](https://laravel.com/docs/eloquent) or [Array](http://php.net/manual/en/language.types.array.php)Returns[Boolean](http://php.net/manual/en/language.types.boolean.php)---

### `Enum`

[](#enum)

The [Enum helper](src/LangleyFoxall/Helpers/Traits/Enum.php) is a trait that provides helpers for dealing with enum classes.

#### Methods

[](#methods-2)

- [`all`](#all-1)
- [`valid`](#valid)

##### `all`

[](#all-1)

Return an array of all values.

###### Example usage

[](#example-usage-8)

```
class UserType
{
    use \LangleyFoxall\Helpers\Traits\Enum;

    const ADMIN = 'admin';
    const USER = 'user';
}

class User extends Eloquent
{
    public function getValidTypes()
    {
        return UserType::all();
    }
}

```

KeyDetailsParametersReturns[Array](http://php.net/manual/en/language.types.array.php)##### `valid`

[](#valid)

Check if a provided value is a valid value of the enum class.

###### Example usage

[](#example-usage-9)

```
class UserType
{
    use \LangleyFoxall\Helpers\Traits\Enum;

    const ADMIN = 'admin';
    const USER = 'user';
}

class User extends Eloquent
{
    public function setTypeAttribute(string $type)
    {
        if (!UserType::valid($type)) {
            throw new InvalidUserType;
        }

        $this->type = $type;
    }
}

```

KeyDetailsParameters[String](http://php.net/manual/en/language.types.array.php)Returns[Boolean](http://php.net/manual/en/language.types.boolean.php)---

### `ApiResponse`

[](#apiresponse)

The [ApiResponse helper](src/LangleyFoxall/Helpers/ApiResponse.php) standardizes an API response. Always containing the same fields:

KeyTypeDescription`status`[Integer](http://php.net/manual/en/language.types.integer.php)`status` is used for accessibility when the response cannot access the HTTP client, such as axios`success`[Boolean](http://php.net/manual/en/language.types.boolean.php)`success` is a boolean to signify that an operation was successful or not`error`[NULL](http://php.net/manual/en/language.types.null.php), [String](http://php.net/manual/en/language.types.string.php) or [Array](http://php.net/manual/en/language.types.array.php)`error` is used to describe errors or warnings that have happened during the operation`data`[NULL](http://php.net/manual/en/language.types.null.php) or [Array](http://php.net/manual/en/language.types.array.php)`data` should contain the main resource information`meta`[NULL](http://php.net/manual/en/language.types.null.php) or [Array](http://php.net/manual/en/language.types.array.php)`meta` should contain extra resource information, such as other endpoints that can be used with the current resourceThe [ApiResponse helper](src/LangleyFoxall/Helpers/ApiResponse.php) also implements [ArrayAccess](http://php.net/manual/en/class.arrayaccess.php) which can be used to transform `data` easily. Example usage can be found [here](https://github.com/langleyfoxall/helpers-laravel/issues/11#issuecomment-415787692).

After building up the response, before returning it from a [Controller](https://laravel.com/docs/controllers), you must call [`json`](#json).

#### Methods

[](#methods-3)

- [`success`](#success)
- [`error`](#error)
- [`data`](#data)
- [`meta`](#meta)
- [`status`](#status)
- [`json`](#json)
- [`cache`](#cache)

##### `success`

[](#success)

Create a successful response instance.

###### Example Usage

[](#example-usage-10)

None of the parameters are required.

```
$api_response = ApiResponse::success($data, $meta, $status)

```

KeyDetailsParameters`data`, `meta`, `status`Returns[ApiResponse](src/LangleyFoxall/Helpers/ApiResponse.php)##### `error`

[](#error)

Create a unsuccessful response instance.

###### Example Usage

[](#example-usage-11)

None of the parameters are required.

```
$api_response = ApiResponse::error($errors, $status)

```

KeyDetailsParameters`error`, `status`Returns[ApiResponse](src/LangleyFoxall/Helpers/ApiResponse.php)##### `data`

[](#data)

Set the data to be returned in the response.

###### Example Usage

[](#example-usage-12)

None of the parameters are required.

```
$api_response->data($data)

```

KeyDetailsParameters[NULL](http://php.net/manual/en/language.types.null.php) or [Array](http://php.net/manual/en/language.types.array.php)Returns[ApiResponse](src/LangleyFoxall/Helpers/ApiResponse.php)##### `meta`

[](#meta)

Set the meta to be returned in the response.

###### Example Usage

[](#example-usage-13)

None of the parameters are required.

```
$api_response->meta($meta)

```

KeyDetailsParameters[NULL](http://php.net/manual/en/language.types.null.php) or [Array](http://php.net/manual/en/language.types.array.php)Returns[ApiResponse](src/LangleyFoxall/Helpers/ApiResponse.php)##### `status`

[](#status)

Set the response status code.

###### Example Usage

[](#example-usage-14)

```
$api_response->status($status)

```

KeyDetailsParameters[Integer](http://php.net/manual/en/language.types.integer.php)Returns[ApiResponse](src/LangleyFoxall/Helpers/ApiResponse.php)##### `json`

[](#json)

Get the JSON response object

###### Example Usage

[](#example-usage-15)

```
$json_response = $api_response->json()

```

KeyDetailsParametersNoneReturns[JsonResponse](https://laravel.com/api/5.6/Illuminate/Http/JsonResponse.html)##### `cache`

[](#cache)

Cache the current `ApiResponse` data for use in a later request. By default if the cache currently has data in it the data will not be overwritten. Using `forceOverwrite` it can be overwritten, this defaults to false. `cache` must be called after `data` is set.

###### Example Usage

[](#example-usage-16)

`lifespan` accepts an [Integer](http://php.net/manual/en/language.types.integer.php) value for the lifespan in minutes or a [Carbon](https://carbon.nesbot.com/docs/) time when the cache will be cleared. `cache` must be an instantiated [ResponseCache](src/LangleyFoxall/Helpers/ResponseCache.php).

```
ApiResponse::success($data)->cache(1, $cache)->json();

```

KeyDetailsParameters`lifespan`, `cache`, `forceOverwrite` *(Optional)*Returns[ApiResponse](src/LangleyFoxall/Helpers/ApiResponse.php)---

### `Response`

[](#response)

The [Response helper](src/LangleyFoxall/Helpers/Response.php) should only be used if, for whatever reason, API endpoints use the same [Controller](https://laravel.com/docs/controllers) methods as web URIs. This helper will check to see if the request is [expecting JSON](https://laravel.com/api/5.6/Illuminate/Http/Request.html#method_expectsJson) or not and return the right response.

KeyTypeDescription`request`[Request](https://laravel.com/api/5.6/Illuminate/Http/Request.html)`request` is used when it comes to deciding which response to return to the client`type`[String](http://php.net/manual/en/language.types.string.php)`type` is a string, "success" or "error", which will determine which [API Response](src/LangleyFoxall/Helpers/ApiResponse.php) is returned`message`[NULL](http://php.net/manual/en/language.types.null.php), [String](http://php.net/manual/en/language.types.string.php) or [String](http://php.net/manual/en/language.types.string.php)`message` is used for a [redirect back](https://laravel.com/docs/helpers#method-back) with a [session variable](https://laravel.com/docs/helpers#method-session) (web) or an error message (API)`data`[NULL](http://php.net/manual/en/language.types.null.php) or [Array](http://php.net/manual/en/language.types.array.php)`data` should contain the main resource information`meta`[NULL](http://php.net/manual/en/language.types.null.php) or [Array](http://php.net/manual/en/language.types.array.php)`meta` should contain extra resource information, such as other endpoints that can be used with the current resource`status`[Integer](http://php.net/manual/en/language.types.integer.php)`status` is used for accessibility when the response cannot access the HTTP client, such as axios`uri`[String](http://php.net/manual/en/language.types.string.php)`uri` is used when wanting to [redirect](https://laravel.com/docs/helpers#method-redirect) rather than [back](https://laravel.com/docs/helpers#method-back) with a web response#### Methods

[](#methods-4)

None of the following methods can be called statically. When instansiating a new instance of Response a [Request](https://laravel.com/api/5.6/Illuminate/Http/Request.html) object is required.

- [`success`](#success-1)
- [`error`](#error-1)
- [`type`](#type)
- [`message`](#type)
- [`data`](#data-1)
- [`meta`](#meta-1)
- [`status`](#status-1)
- [`redirect`](#redirect)
- [`end`](#end)

##### `success`

[](#success-1)

Create a successful response.

###### Example Usage

[](#example-usage-17)

None of the parameters are required.

```
$response = (new Response($request)->success($message, $data, $meta, $status)

```

KeyDetailsParameters`message`, `data`, `meta`, `status`Returns[Response](src/LangleyFoxall/Helpers/Response.php)##### `error`

[](#error-1)

Create a unsuccessful response.

###### Example Usage

[](#example-usage-18)

None of the parameters are required.

```
$response = (new Response($request)->success($message, $status)

```

KeyDetailsParameters`message`, `status`Returns[Response](src/LangleyFoxall/Helpers/Response.php)##### `type`

[](#type)

Set the response type. While error and success are not aggressively checked the type will default to success if not error.

###### Example Usage

[](#example-usage-19)

```
$response = (new Response($request)->success($type)

```

KeyDetailsParameters`type`Returns[Response](src/LangleyFoxall/Helpers/Response.php)##### `message`

[](#message)

Set the message to be displayed if an error occurs or a [back](https://laravel.com/docs/helpers#method-back) is triggered.

###### Example Usage

[](#example-usage-20)

```
$response = (new Response($request)->message($message)

```

KeyDetailsParameters`message`Returns[Response](src/LangleyFoxall/Helpers/Response.php)##### `data`

[](#data-1)

Set the data to be returned in an successful [ApiResponse](src/LangleyFoxall/Helpers/ApiResponse.php).

###### Example Usage

[](#example-usage-21)

None of the parameters are required.

```
$response = (new Response($request)->data($data)

```

KeyDetailsParameters`data`Returns[Response](src/LangleyFoxall/Helpers/Response.php)##### `meta`

[](#meta-1)

Set the meta to be returned in an successful [ApiResponse](src/LangleyFoxall/Helpers/ApiResponse.php).

###### Example Usage

[](#example-usage-22)

None of the parameters are required.

```
$response = (new Response($request)->meta($meta)

```

KeyDetailsParameters`meta`Returns[Response](src/LangleyFoxall/Helpers/Response.php)##### `status`

[](#status-1)

Set the status to be returned in an [ApiResponse](src/LangleyFoxall/Helpers/ApiResponse.php). This will be overwritten if called before `success` or `error`.

###### Example Usage

[](#example-usage-23)

```
$response = (new Response($request)->status($status)

```

KeyDetailsParameters`status`Returns[Response](src/LangleyFoxall/Helpers/Response.php)##### `redirect`

[](#redirect)

Set the [redirect](https://laravel.com/docs/helpers#method-redirect) URI to be called rather than redirecting [back](https://laravel.com/docs/helpers#method-back).

###### Example Usage

[](#example-usage-24)

None of the parameters are required.

```
$response = (new Response($request)->redirect($uri)

```

KeyDetailsParameters`uri`Returns[Response](src/LangleyFoxall/Helpers/Response.php)##### `end`

[](#end)

Return the expected response.

###### Example Usage

[](#example-usage-25)

```
$expected_response = (new Response($request)->end()

```

KeyDetailsParametersNoneReturns[RedirectResponse](https://laravel.com/api/5.6/Illuminate/Http/RedirectResponse.html) or [JsonResponse](https://laravel.com/api/5.6/Illuminate/Http/JsonResponse.html)---

### `ResponseCache`

[](#responsecache)

The `ResponseCache` helper simplifies caching API Responses taking into account differing request parameters and user accounts. Unique caches are generated based on the request route, method, parameters and user.

KeyTypeDescription`request`[Request](https://laravel.com/api/5.6/Illuminate/Http/Request.html)The request that the cache will be for.`userSpecific`[Boolean](http://php.net/manual/en/language.types.boolean.php)`userSpecific` specifies if the response is cached for individual users or if all users share one cache. **Important:** Misuse of `userSpecific` can lead to massive inefficiencies and security flaws. If a response is the same for any user `userSpecific` should be set to false so that a new cache is not created for every user. If a response contains data pertaining to that user `userSpecific` should be set to true so that users do not receive someone else's cached data.`excludeParams`*(Optional)* [NULL](http://php.net/manual/en/language.types.null.php) or [Array](http://php.net/manual/en/language.types.array.php)Since request parameters are likely to change the data generated a seperate cache is generated for different sets of parameters so that the correct data is returned. However some parameters do not change the data generated so a new cache does not need to be generated when they change. Adding these parameters to `excludeParams` will mean that they are ignored.#### Methods

[](#methods-5)

None of the following methods can be called statically.

- [`hasData`](#hasdata)
- [`getData`](#getdata)
- [`cacheData`](#cachedata)
- [`getKey`](#getkey)
- [`clear`](#clear)

##### `hasData `

[](#hasdata-)

Returns if the current cache has any data.

###### Example Usage

[](#example-usage-26)

```
if($cache->hasData()){...

```

KeyDetailsParametersNoneReturns[Boolean](http://php.net/manual/en/language.types.boolean.php)##### `getData `

[](#getdata-)

Returns the data currently in the cache, returns `null` if empty.

###### Example Usage

[](#example-usage-27)

```
$data = $cache->getData();

```

KeyDetailsParametersNoneReturnsMixed##### `cacheData `

[](#cachedata-)

Saves data to the cache. Any data currently in the cache will be overwritten/

###### Example Usage

[](#example-usage-28)

`data` can be any serializable data, `lifespan` can be minutes as an [Integer](http://php.net/manual/en/language.types.integer.php) or a [Carbon](https://carbon.nesbot.com/docs/) time that the cache will expire at.

```
$cache->cacheData(["Hello" => "World"], Carbon:now()->addSeconds(4404));

```

KeyDetailsParameters`data`, `lifespan`ReturnsNone##### `getKey `

[](#getkey-)

Returns the unique key for the cache generated based on the request path, method, parameters and user.

###### Example Usage

[](#example-usage-29)

```
$key = $cache->getKey();

```

KeyDetailsParametersNoneReturns[String](http://php.net/manual/en/language.types.string.php)##### `clear `

[](#clear-)

Clears the data for the given cache.

###### Example Usage

[](#example-usage-30)

```
$cache->clear();

```

KeyDetailsParametersNoneReturnsNone#### Usage with ApiResponse

[](#usage-with-apiresponse)

A cache can be created from an`ApiResponse` automatically by using the `cache` function on it. It will only cache new data if the cache does not contain data. [See documentation here](#cache).

###### Example Usage

[](#example-usage-31)

```
$cache = new ResponseCache($request, false);

if($cache->hasData()){
    $data = $cache->getData();
}else{
    $data = computationallyExpensiveFunction();
}

return ApiResponse::success($data)->cache(1, $cache)->json();

```

### `IdentifiedByUUID`

[](#identifiedbyuuid)

The `IdentifiedByUUID` trait allows you to easily use V4 UUIDs over incrementing primary keys.

###### Example Usage

[](#example-usage-32)

Change your migrations to allow the use of a UUID.

```
public function up()
{
    Schema::create('demos', function (Blueprint $table) {
        $table->uuid('id')->primary();
        $table->timestamps();
    });
}
```

Use the trait.

```
class Demo extends Model
{
    use IdentifiedByUUID;
}
```

Now when the model is saved, it will automatically be populated with a V4 UUID.

###  Health Score

59

—

FairBetter than 98% of packages

Maintenance79

Regular maintenance activity

Popularity30

Limited adoption so far

Community25

Small or concentrated contributor base

Maturity88

Battle-tested with a long release history

 Bus Factor3

3 contributors hold 50%+ of commits

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

Recently: every ~639 days

Total

21

Last Release

4d ago

Major Versions

1.12.1 → 2.0.02021-04-21

2.0.0 → v3.0.02024-07-01

v3.0.0 → v4.0.02026-07-01

PHP version history (4 changes)1.0.0.x-devPHP ^7.1.3

1.1.2PHP ^7.0.0

2.0.0PHP ^7.3||^8.0

v4.0.0PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/c580cdf7c14898fff179cdfc1085892091d5d2f49d917873a12365af9ac77c93?d=identicon)[Jord-JD](/maintainers/Jord-JD)

![](https://avatars.githubusercontent.com/u/18738623?v=4)[Codebased Ltd](/maintainers/langleyfoxall)[@langleyfoxall](https://github.com/langleyfoxall)

![](https://www.gravatar.com/avatar/fe494acbaf738dfb198cb8281a86065597bfb032317e3b111bb6f278b15ab727?d=identicon)[wheatleyjj](/maintainers/wheatleyjj)

![](https://www.gravatar.com/avatar/33e9c78f0bea72d2fa229c8c357d5fa610d2fb49b6de18438d00c88948463efb?d=identicon)[dextermb](/maintainers/dextermb)

![](https://www.gravatar.com/avatar/244b9a2f91a7a41cb432c5ed8024f23d29630b250b8a217a6410306236ff5914?d=identicon)[NilesB](/maintainers/NilesB)

---

Top Contributors

[![dextermb](https://avatars.githubusercontent.com/u/6137789?v=4)](https://github.com/dextermb "dextermb (32 commits)")[![Jord-JD](https://avatars.githubusercontent.com/u/650645?v=4)](https://github.com/Jord-JD "Jord-JD (20 commits)")[![jaredkove](https://avatars.githubusercontent.com/u/23653050?v=4)](https://github.com/jaredkove "jaredkove (15 commits)")[![AlexCatch](https://avatars.githubusercontent.com/u/13490042?v=4)](https://github.com/AlexCatch "AlexCatch (15 commits)")[![jameswilddev](https://avatars.githubusercontent.com/u/3138458?v=4)](https://github.com/jameswilddev "jameswilddev (11 commits)")[![NilesB](https://avatars.githubusercontent.com/u/7305403?v=4)](https://github.com/NilesB "NilesB (11 commits)")[![asheywood](https://avatars.githubusercontent.com/u/102961238?v=4)](https://github.com/asheywood "asheywood (4 commits)")

---

Tags

phplaravelhelpers

### Embed Badge

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

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.5k55.4M8.5k](/packages/larastan-larastan)[api-platform/laravel

API Platform support for Laravel

58171.6k14](/packages/api-platform-laravel)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5022.0k](/packages/simplestats-io-laravel-client)[calebdw/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

15118.7k4](/packages/calebdw-larastan)

PHPackages © 2026

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