PHPackages                             ahuseiny/laravel-userstamps - 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. ahuseiny/laravel-userstamps

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

ahuseiny/laravel-userstamps
===========================

A simple Laravel package for Eloquent Model user specific fields.

v3.0.3(5y ago)0531MITPHPPHP ^8.0

Since Aug 4Pushed 4y agoCompare

[ Source](https://github.com/aramhuseiny/laravel-userstamps)[ Packagist](https://packagist.org/packages/ahuseiny/laravel-userstamps)[ Docs](https://github.com/hrshadhin/laravel-userstamps)[ RSS](/packages/ahuseiny-laravel-userstamps/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (12)Used By (0)

Laravel Userstamps
==================

[](#laravel-userstamps)

Laravel Userstamps is a simple Laravel package for your Eloquent Model user specific fields. This package automatically inserts/updates an user id on your table on who created, last updated and deleted the record.

Install
-------

[](#install)

1. Add repositories in composer.json

```
"repositories": [
   {
     "url": "https://github.com/hrshadhin/laravel-userstamps.git",

      "type": "git"
    }
 ],

```

2. Add the package name in `composer.json` require section:
    - For Laravel 5.x use [v1.0.1](https://github.com/hrshadhin/laravel-userstamps/releases/tag/v1.0.1)

    ```
     "hrshadhin/laravel-userstamps": "^1.0.0"

    ```

    - For Laravel 6.x use `master` or [v2.0.1](https://github.com/hrshadhin/laravel-userstamps/releases/tag/v2.0.1)

    ```
     "hrshadhin/laravel-userstamps": "^2.0.0"

    ```

    - For Laravel 7.x use `master` or [v3.0.0](https://github.com/hrshadhin/laravel-userstamps/releases/tag/v3.0.0)

    ```
     "hrshadhin/laravel-userstamps": "^3.0.0"

    ```

Usage
-----

[](#usage)

Update your model's migration and add `created_by`, `updated_by` and `deleted_by` field using the `userstamps()` blueprint macro.

```
Schema::create('users', function (Blueprint $table) {
    $table->increments('id');
    $table->string('name', 100);
    $table->userstamps();
    $table->timestamps();
});
```

Then use `UserstampsTrait` on your model.

```
namespace App;

use Hrshadhin\Userstamps\UserstampsTrait;

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

Dropping columns
----------------

[](#dropping-columns)

You can drop auditable columns using `dropUserstamps()` method.

```
Schema::create('users', function (Blueprint $table) {
    $table->dropUserstamps();
});
```

And your done!

License
-------

[](#license)

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

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor1

Top contributor holds 73.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 ~88 days

Recently: every ~40 days

Total

11

Last Release

2012d ago

Major Versions

v1.0.0 → 2.x-dev2020-05-01

v1.0.1 → 3.x-dev2020-07-25

PHP version history (5 changes)v1.0.0PHP &gt;=7.0

2.x-devPHP ^7.2

3.x-devPHP ^7.2.5

v3.0.1PHP ^7.2.5|^8.0

v3.0.2PHP ^8.0

### Community

Maintainers

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

---

Top Contributors

[![hrshadhin](https://avatars.githubusercontent.com/u/2318901?v=4)](https://github.com/hrshadhin "hrshadhin (17 commits)")[![aramhuseiny](https://avatars.githubusercontent.com/u/12831959?v=4)](https://github.com/aramhuseiny "aramhuseiny (4 commits)")[![b4oshany](https://avatars.githubusercontent.com/u/1830494?v=4)](https://github.com/b4oshany "b4oshany (1 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

laraveleloquentuserstampscreated\_byupdated\_bydeleted\_byhrshadhin

### Embed Badge

![Health badge](/badges/ahuseiny-laravel-userstamps/health.svg)

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

###  Alternatives

[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k8.4M96](/packages/mongodb-laravel-mongodb)[kirschbaum-development/eloquent-power-joins

The Laravel magic applied to joins.

1.6k32.6M46](/packages/kirschbaum-development-eloquent-power-joins)[wildside/userstamps

Laravel Userstamps provides an Eloquent trait which automatically maintains `created\_by` and `updated\_by` columns on your model, populated by the currently authenticated user in your application.

7551.9M22](/packages/wildside-userstamps)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M345](/packages/psalm-plugin-laravel)[yajra/laravel-oci8

Oracle DB driver for Laravel via OCI8

8793.2M25](/packages/yajra-laravel-oci8)[glushkovds/phpclickhouse-laravel

Adapter of the most popular library https://github.com/smi2/phpClickHouse to Laravel

2051.5M2](/packages/glushkovds-phpclickhouse-laravel)

PHPackages © 2026

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