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

ActiveLibrary

sqits/laravel-userstamps
========================

Package to add created\_by, updated\_by and deleted\_by to models.

0.0.16(1mo ago)1837.3k↑105%8MITPHPPHP ^7.4|^8.0CI failing

Since Apr 11Pushed 1mo ago3 watchersCompare

[ Source](https://github.com/sqits/laravel-userstamps)[ Packagist](https://packagist.org/packages/sqits/laravel-userstamps)[ Docs](https://github.com/sqits/laravel-userstamps)[ RSS](/packages/sqits-laravel-userstamps/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (10)Versions (21)Used By (0)

Package to maintain the users who created, updated and deleted eloquent models
==============================================================================

[](#package-to-maintain-the-users-who-created-updated-and-deleted-eloquent-models)

Provides an Eloquent trait to automatically maintain the created\_by, updated\_by, and deleted\_by (when using softDeletes) on your models by the currently logged in user.

[![Latest Version on Packagist](https://camo.githubusercontent.com/3753647502320fab62bb652d22c03958d17113220f6babd2f07fb882ce24c474/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73716974732f6c61726176656c2d757365727374616d70732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sqits/laravel-userstamps)[![Quality Score](https://camo.githubusercontent.com/6d124e594998b293137b484ed16ae5f0e5b48cdaec05d333647ec8ada72573f1/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f73716974732f6c61726176656c2d757365727374616d70732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/sqits/laravel-userstamps)[![StyleCI](https://camo.githubusercontent.com/ea9bacbccfb9fb165745dcd43840c41d05c81180cd3c1ce4214bb7cc074f393e/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3138303831363635392f736869656c64)](https://styleci.io/repos/180816659)[![Total Downloads](https://camo.githubusercontent.com/3650cfba3f3f0544f42c8470a21a1dff906075a64a966f1d346e88427e34f011/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73716974732f6c61726176656c2d757365727374616d70732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sqits/laravel-userstamps)

Installation and usage
----------------------

[](#installation-and-usage)

This package requires PHP 7.2 and Laravel 5.6 or higher. Install the package by running the following command in your console;

```
composer require sqits/laravel-userstamps
```

You can publish the config file with:

```
php artisan vendor:publish --provider="Sqits\UserStamps\UserStampsServiceProvider" --tag="config"
```

This is the contents of the published config file:

```
return [

    /*
     * Define the table which is used in the database to retrieve the users
     */

    'users_table' => 'users',

    /*
     * Define the table column type which is used in the table schema for
     * the id of the user
     *
     * Options: increments, bigIncrements, uuid, ulid
     * Default: bigIncrements
     */

    'users_table_column_type' => 'bigIncrements',

    /*
     * Define the name of the column which is used in the foreign key reference
     * to the id of the user
     */

    'users_table_column_id_name' => 'id',

    /*
     * Define the mmodel which is used for the relationships on your models
     */

    'users_model' => \App\Models\User::class,

    /*
     * Define the column which is used in the database to save the user's id
     * which created the model.
     */

    'created_by_column' => 'created_by',

    /*
     * Define the column which is used in the database to save the user's id
     * which updated the model.
     */

    'updated_by_column' => 'updated_by',

    /*
     * Define the column which is used in the database to save the user's id
     * which deleted the model.
     */

    'deleted_by_column' => 'deleted_by',

];
```

Add the macro to your migration of your model

```
public function up()
{
    Schema::create('table_name', function (Blueprint $table) {
        ...

        $table->userstamps();
        $table->softUserstamps();
    });
}
```

Add the Trait to your model

```
use Sqits\UserStamps\Concerns\HasUserStamps;

class Example extends Model {

    use HasUserStamps;
}
```

There will be methods available to retrieve the user object which performs the action for creating, updating or deleting

```
$model->author; // the user who created the model
$model->editor; // the user who last updated the model
$model->destroyer; // the user who deleted the model
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Security
--------

[](#security)

If you discover any security-related issues, please [email](mailto:info@sqits.nl) to  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Sqits](https://github.com/sqits)
- [Ruud Schaaphuizen](https://github.com/rschaaphuizen)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

56

—

FairBetter than 98% of packages

Maintenance90

Actively maintained with recent releases

Popularity39

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 78.6% 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 ~169 days

Recently: every ~184 days

Total

16

Last Release

53d ago

PHP version history (4 changes)0.0.1PHP ^7.1

0.0.2PHP ^7.2

0.0.9PHP ^7.2|^8.0

0.0.11PHP ^7.4|^8.0

### Community

Maintainers

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

---

Top Contributors

[![rschaaphuizen](https://avatars.githubusercontent.com/u/517647?v=4)](https://github.com/rschaaphuizen "rschaaphuizen (11 commits)")[![andreadam82](https://avatars.githubusercontent.com/u/40360819?v=4)](https://github.com/andreadam82 "andreadam82 (1 commits)")[![orjanalmen](https://avatars.githubusercontent.com/u/3464289?v=4)](https://github.com/orjanalmen "orjanalmen (1 commits)")[![Sophist-UK](https://avatars.githubusercontent.com/u/3001893?v=4)](https://github.com/Sophist-UK "Sophist-UK (1 commits)")

---

Tags

laraveluserstampsupdatedcreateddeleted

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11120.2M21](/packages/anourvalar-eloquent-serialize)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)

PHPackages © 2026

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