Skip to content

WARNING You're browsing the documentation for an upcoming version of Laravel Auditable. The documentation and features of this release are subject to change.

Auditable Trait

Using AuditableTrait trait on your model will give you the following api.


Get the instance of the User who created the record.

$post = Post::first();
$creator = $post->creator;


Get the instance of the User who last updated the record.

$post = Post::first();
$updater = $post->updater;

Owned Scope

A query scope that limits the results to a list of records that the current user owned.

$posts = Post::owned()->get();