PHPackages                             yabhq/laravel-mint - 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. yabhq/laravel-mint

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

yabhq/laravel-mint
==================

A collection of traits, macros and other helpers to keep your Laravel app feeling fresh.

v1.4(1mo ago)827.1k↓35%31MITPHPPHP ^8.3CI failing

Since Jan 21Pushed 1mo agoCompare

[ Source](https://github.com/yabhq/laravel-mint)[ Packagist](https://packagist.org/packages/yabhq/laravel-mint)[ Docs](https://github.com/buildwithyab/laravel-mint)[ RSS](/packages/yabhq-laravel-mint/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (7)Versions (36)Used By (1)

[![Latest Version on Packagist](https://camo.githubusercontent.com/b030b8b42e2709b358238a4abeea522a4406cc59414cf495ef453e0606917732/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6275696c64776974687961622f6c61726176656c2d6d696e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/buildwithyab/laravel-mint)

Mint for Laravel
================

[](#mint-for-laravel)

A collection of traits, macros and other helpers to keep your Laravel app feeling fresh.

### Installation

[](#installation)

```
composer require buildwithyab/laravel-mint

```

### Archivable

[](#archivable)

Allow for models to be archived or unarchived based on an "archived\_at" field on the database table. A global scope automatically excludes archived records when querying your model.

```
use Yab\Mint\Traits\Archivable;

class Example extends Model
{
    use Archivable;
}
```

```
$example->archive();
$example->unarchive();

Example::query(); // Will exclude archived items...
Example::withArchived(); // With archived items included...
```

### Immutable

[](#immutable)

Models which are marked as "immutable" will throw an ImmutableDataException if updated or deleted (but not created).

```
use Yab\Mint\Traits\Immutable;

class Example extends Model
{
    use Immutable;
}
```

```
// No problem
$example = Example::create([
    'field' => 'value'
]);

// Throws an exception...
$example->update([
    'field' => 'updated'
]);
```

You can also customize the conditions under which a model is immutable by overriding the isImmutable() function on your model:

```
public function isImmutable()
{
    return $this->status === 'closed';
}
```

### Money Cast

[](#money-cast)

A custom cast for storing monetary values as cents in the database while fetching them as decimal values.

```
use Yab\Mint\Casts\Money;

class Example extends Model
{
    protected $casts = [
        'price' => Money::class,
    ];
}
```

### Slugify

[](#slugify)

Create slugs that are unique and never collide with each other.

```
use Yab\Mint\Trails\Slugify;

class Example extends Model
{
    use Slugify;
}
```

By default the Slugify trait uses the name property on your model. You can change this behaviour by overriding the getSlugKeyName method on your model.

```
public static function getSlugKeyName(): string
{
    return 'title';
}
```

### Avatars

[](#avatars)

The HasAvatar trait allows you to easily support avatars for your users. It even has a built-in Gravatar fallback!

```
use Yab\Mint\Trails\HasAvatar;

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

You can customize the database field used to retrieve the profile images:

```
public function getAvatarField() : string
{
    return 'profile_picture';
}
```

It is also possible to determine which field is used for the Gravatar email address:

```
public function getEmailField(): string
{
    return 'email';
}
```

###  Health Score

60

—

FairBetter than 99% of packages

Maintenance88

Actively maintained with recent releases

Popularity35

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity83

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 61.2% 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 ~75 days

Recently: every ~312 days

Total

31

Last Release

58d ago

Major Versions

v0.20.0 → v1.0.02022-02-02

PHP version history (9 changes)v0.1PHP ^7.2

v0.9.0PHP ^7.3

v0.15.0PHP ^7.3|^8.0

v1.0.0PHP ^7.4|^8.0

v1.1.0PHP ^7.4|^8.0|^8.1

v1.1.1PHP ^8.1|^8.2

v1.2PHP ^8.2|^8.3

v1.3PHP ^8.2|^8.3|^8.4

v1.4PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/984e9ca93bfafa657c70f75e5d7652c486ca2201d7726b10f50e633324e788f1?d=identicon)[chrisblackwell](/maintainers/chrisblackwell)

![](https://avatars.githubusercontent.com/u/6893042?v=4)[Jim Hlad](/maintainers/jimhlad)[@jimhlad](https://github.com/jimhlad)

---

Top Contributors

[![jimhlad](https://avatars.githubusercontent.com/u/6893042?v=4)](https://github.com/jimhlad "jimhlad (71 commits)")[![chrisblackwell](https://avatars.githubusercontent.com/u/856537?v=4)](https://github.com/chrisblackwell "chrisblackwell (35 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (9 commits)")[![LukeTowers](https://avatars.githubusercontent.com/u/7253840?v=4)](https://github.com/LukeTowers "LukeTowers (1 commits)")

---

Tags

laravellaravelhelperstraitsmacrosyabmintbuildwithyab

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/yabhq-laravel-mint/health.svg)

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

###  Alternatives

[werxe/laravel-collection-macros

Custom Laravel Collection macros.

2625.8k](/packages/werxe-laravel-collection-macros)[prologue/support

Prologue Support is an extension for Illuminate Support

1616.8k](/packages/prologue-support)

PHPackages © 2026

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