PHPackages                             andreadam82/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. andreadam82/laravel-userstamps

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

andreadam82/laravel-userstamps
==============================

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

0.0.11(3y ago)07MITPHPPHP ^7.2|^8.0

Since Sep 14Pushed 3y agoCompare

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

READMEChangelog (1)Dependencies (5)Versions (2)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/9d16005a86efd9c6c13a1d5724a7dec51ccff3b1be4a40f71396f3833d18f552/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f66696e64796f757261637469766974792f6c61726176656c2d757365727374616d70732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/findyouractivity/laravel-userstamps)[![StyleCI](https://camo.githubusercontent.com/3092ec133d29e8608c33e181551861c87f115dd0ea513d36854d404454e58386/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3437323837363234362f736869656c64)](https://styleci.io/repos/472876246)[![Total Downloads](https://camo.githubusercontent.com/d8d44d1cadfcbe78b9d780b3fd5fd716bf352114182f91392f35d7f05956ef6f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f66696e64796f757261637469766974792f6c61726176656c2d757365727374616d70732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/findyouractivity/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 andreadam82/laravel-userstamps
```

You can publish the config file with:

```
php artisan vendor:publish --provider="Andreadam82\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
     * 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

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 56.3% 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

Unknown

Total

1

Last Release

1337d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8d4a9d3247872ab44e7faed0e79dfbdd699a80d4d853c84c7b008a3bb1d5bde0?d=identicon)[andreadam82](/maintainers/andreadam82)

---

Top Contributors

[![kjlloydie](https://avatars.githubusercontent.com/u/489813?v=4)](https://github.com/kjlloydie "kjlloydie (9 commits)")[![andreadam82](https://avatars.githubusercontent.com/u/40360819?v=4)](https://github.com/andreadam82 "andreadam82 (6 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (1 commits)")

---

Tags

laraveluserstampsupdatedcreateddeleted

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[livewire/volt

An elegantly crafted functional API for Laravel Livewire.

4195.3M84](/packages/livewire-volt)[sqits/laravel-userstamps

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

1837.3k](/packages/sqits-laravel-userstamps)[gehrisandro/tailwind-merge-laravel

TailwindMerge for Laravel merges multiple Tailwind CSS classes by automatically resolving conflicts between them

341682.2k18](/packages/gehrisandro-tailwind-merge-laravel)[nickurt/laravel-akismet

Akismet for Laravel 11.x/12.x/13.x

97139.6k2](/packages/nickurt-laravel-akismet)[whitecube/laravel-timezones

Store UTC dates in the database and work with custom timezones in the application.

106106.2k](/packages/whitecube-laravel-timezones)[forxer/laravel-gravatar

A library providing easy gravatar integration in a Laravel project.

4235.6k](/packages/forxer-laravel-gravatar)

PHPackages © 2026

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