Description
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.
Your model will need to include a created_by and updated_by column, defaulting to null.
If using the Laravel SoftDeletes trait, it will also need a deleted_by column.
The column type should match the type of the ID column in your user's table.
Userstamp columns can be created using:
$table->userstamps();$table->userstampSoftDeletes();
Equivalent methods are also available when working with UUIDs.
$table->userstampsUuid();$table->userstampsUuidSoftDeletes();
You can now load the trait within your model, and userstamps will automatically be maintained:
use Mattiverse\Userstamps\Traits\Userstamps; class Foo extends Model { use Userstamps;}
Recent Courses on Laravel Daily
AI Agents/IDEs for Laravel: May 2026 (Claude Code, Codex, OpenCode, etc)
7 lessons
52 min
Laravel 13 Starter Kit Teams and Customizations
10 lessons
33 min
How to Structure Laravel 13 Projects
16 lessons
1 h 32 min read