PHPackages                             aslnbxrz/simple-prefix - 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. [Database &amp; ORM](/categories/database)
4. /
5. aslnbxrz/simple-prefix

ActiveLibrary[Database &amp; ORM](/categories/database)

aslnbxrz/simple-prefix
======================

Tiny, fast Eloquent prefix generator (trait + optional interface) with zero-hassle defaults.

1.0.4(4mo ago)1100↓50%MITPHPPHP &gt;=8.0.2

Since Sep 12Pushed 4mo agoCompare

[ Source](https://github.com/aslnbxrz/simple-prefix)[ Packagist](https://packagist.org/packages/aslnbxrz/simple-prefix)[ RSS](/packages/aslnbxrz-simple-prefix/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (6)Used By (0)

simple-prefix
=============

[](#simple-prefix)

[![Latest Version on Packagist](https://camo.githubusercontent.com/8880a3554b1fbd48051a9188640a9d18a4dfe9916b7771518051abf6f2b03994/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f61736c6e6278727a2f73696d706c652d7072656669782e737667)](https://packagist.org/packages/aslnbxrz/simple-prefix)[![Total Downloads](https://camo.githubusercontent.com/04bf0c4f5e265c1f21d45347ac277493e0ed43b7a02e9b1ecd72a204b4c43720/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f61736c6e6278727a2f73696d706c652d7072656669782e737667)](https://packagist.org/packages/aslnbxrz/simple-prefix)[![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](LICENSE)

Tiny, fast Eloquent prefix generator (trait + optional interface) with zero-hassle defaults.
Designed for Laravel models where you need a consistent, readable, and configurable prefix (like `ORD-123-slug`) without boilerplate code.

---

Features
--------

[](#features)

- ⚡ **Lightweight &amp; fast** – no `Collection`, no `data_get`, optimized for large datasets
- 🔧 **Configurable defaults** – via `config/simple-prefix.php`
- 📦 **Per-model constants** – `PREFIX`, `PREFIX_FROM`, `PREFIX_SEPARATOR`
- 🧩 **Dynamic override** – use `definePrefixVia()` or a runtime resolver
- ✅ **Safe by design** – prevents N+1 issues, includes caching
- 🛡️ **Zero overload** – works out of the box, but flexible if you need it

---

Install
-------

[](#install)

```
composer require aslnbxrz/simple-prefix
php artisan vendor:publish --tag=simple-prefix-config # optional
```

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance74

Regular maintenance activity

Popularity15

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.9% 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 ~24 days

Total

5

Last Release

143d ago

PHP version history (2 changes)v1.0.0PHP &gt;=8.1

v1.0.1PHP &gt;=8.0.2

### Community

Maintainers

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

---

Top Contributors

[![aslnbxrz](https://avatars.githubusercontent.com/u/60058750?v=4)](https://github.com/aslnbxrz "aslnbxrz (8 commits)")[![bexaslonov123](https://avatars.githubusercontent.com/u/132657291?v=4)](https://github.com/bexaslonov123 "bexaslonov123 (1 commits)")

---

Tags

laravelmodeleloquenttraitprefixaccessor

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/aslnbxrz-simple-prefix/health.svg)

```
[![Health](https://phpackages.com/badges/aslnbxrz-simple-prefix/health.svg)](https://phpackages.com/packages/aslnbxrz-simple-prefix)
```

###  Alternatives

[esensi/model

The base model traits of Esensi

20266.5k1](/packages/esensi-model)[rtconner/laravel-likeable

Trait for Laravel Eloquent models to allow easy implementation of a 'like' or 'favorite' or 'remember' feature.

394388.0k5](/packages/rtconner-laravel-likeable)[greabock/tentacles

Da epic tentacles for Eloquent

3634.4k](/packages/greabock-tentacles)[astrotomic/laravel-cachable-attributes

Allows to cache attribute accessor values in an easy way.

3240.0k](/packages/astrotomic-laravel-cachable-attributes)[korridor/laravel-computed-attributes

Laravel package that adds computed attributes to eloquent models. A computed attribute is an accessor were the computed value is saved in the database.

1237.6k](/packages/korridor-laravel-computed-attributes)

PHPackages © 2026

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