Skip to content
A simple Laravel package for Eloquent Model user specific feilds.
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
composer.json fixed config bug Jun 2, 2018 update readme Jun 2, 2018

Laravel Userstamps

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


  1. Add repositories in composer.json
"repositories": [
     "url": "",

      "type": "git"
  1. Add the package name in require with the branch name after the dev:
"hrshadhin/laravel-userstamps": "dev-master"


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->string('name', 100);

Then use UserstampsTrait on your model.

namespace App;

use Hrshadhin\Userstamps\UserstampsTrait;

class User extends Model
    use UserstampsTrait;

Dropping columns

You can drop auditable columns using dropUserstamps() method.

Schema::create('users', function (Blueprint $table) {

And your done!


The MIT License (MIT). Please see License File for more information.

You can’t perform that action at this time.