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

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

mazyvan/userstamps
==================

A fork from WildSide. Eloquent trait to automatically maintain created\_by and updated\_by (and deleted\_by when using SoftDeletes) on your models

0.6.0(7y ago)3156MITPHPPHP &gt;=5.5.9

Since Mar 10Pushed 7y ago1 watchersCompare

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

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

Mazyvan/Userstamps
==================

[](#mazyvanuserstamps)

### MAYBE UNSTABLE. READ BELOW

[](#maybe-unstable-read-below)

**Warning**: This is a fork from WildSideUK/Laravel-Userstamps that doesn't fire the laravel "update" [events](https://laravel.com/docs/5.4/eloquent#events) on deletions. It's only purpouse is for the Virtuamx team to work with this lib while the WildSideUK team check for the [issue 23](https://github.com/WildSideUK/Laravel-Userstamps/issues/23). If they approve the pull request. This fork will be deprecated.

**Stability Important Note**: I have experienced issues with this plugin using Passport. This issue is reported here -&gt; [mattiverse#17](https://github.com/mattiverse/Laravel-Userstamps/issues/17)So I tried the solution of setting manually the `'web'` guard. This plugin also have that workaround.
I think you should not have problems unless you use different models for your 'web' and 'api' logins. That's my thoughts.

Provides an Eloquent trait to automatically maintain created\_by and updated\_by (and deleted\_by when using SoftDeletes) on your models.

Requirements
------------

[](#requirements)

- This package requires PHP 5.6+
- It works with Laravel 5.x (and may work with earlier versions too).

Installation
------------

[](#installation)

Require this package with composer

```
composer require mazyvan/userstamps

```

Migrate your Model's table to include a `created_by` and `updated_by` (and `deleted_by` if using `SoftDeletes`).

```
$table -> unsignedInteger('created_by') -> nullable() -> default(null) -> after('created_at');
$table -> unsignedInteger('updated_by') -> nullable() -> default(null) -> after('updated_at');
```

Load the trait in your Model.

```
use Mazyvan\Userstamps\Userstamps;

class Example extends Model {

    use Userstamps;
}
```

The following methods become available on your models to help retrieve the users creating, updating and deleting (if using SoftDeletes).

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

If you want to manually set the `created_by` or `updated_by` properties on your model you can stop Userstamps being automatically maintained using the `stopUserstamping` method.

If you want to define the `created_by`, `updated_by`, or `deleted_by` column names, add the following class constants to your model(s).

```
const CREATED_BY = 'created_by';
const UPDATED_BY = 'updated_by';
const DELETED_BY = 'deleted_by';
```

License
-------

[](#license)

This open-source software is licensed under the [MIT license](https://opensource.org/licenses/MIT).

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 70% 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 ~61 days

Recently: every ~31 days

Total

17

Last Release

2727d ago

PHP version history (2 changes)0.1.0PHP &gt;=5.6

0.1.2PHP &gt;=5.5.9

### Community

Maintainers

![](https://www.gravatar.com/avatar/3226280e969370151deee798ad6a758fe9f71b230033f86d30b961160ed59783?d=identicon)[mazyvan](/maintainers/mazyvan)

---

Top Contributors

[![mazyvan](https://avatars.githubusercontent.com/u/10915753?v=4)](https://github.com/mazyvan "mazyvan (7 commits)")[![RomeroMsk](https://avatars.githubusercontent.com/u/4639951?v=4)](https://github.com/RomeroMsk "RomeroMsk (1 commits)")[![tacone](https://avatars.githubusercontent.com/u/659801?v=4)](https://github.com/tacone "tacone (1 commits)")[![tkayfun](https://avatars.githubusercontent.com/u/10990971?v=4)](https://github.com/tkayfun "tkayfun (1 commits)")

---

Tags

laraveleloquentuserstampscreated\_byupdated\_bydeleted\_by

### Embed Badge

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

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

###  Alternatives

[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.

7511.7M13](/packages/wildside-userstamps)[cybercog/laravel-love

Make Laravel Eloquent models reactable with any type of emotions in a minutes!

1.2k302.7k1](/packages/cybercog-laravel-love)[cviebrock/eloquent-taggable

Easy ability to tag your Eloquent models in Laravel.

567694.8k3](/packages/cviebrock-eloquent-taggable)[reedware/laravel-relation-joins

Adds the ability to join on a relationship by name.

2121.2M13](/packages/reedware-laravel-relation-joins)[highsolutions/eloquent-sequence

A Laravel package for easy creation and management sequence support for Eloquent models with elastic configuration.

121130.3k](/packages/highsolutions-eloquent-sequence)[toponepercent/baum

Baum is an implementation of the Nested Set pattern for Eloquent models.

3154.7k](/packages/toponepercent-baum)

PHPackages © 2026

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