Skip to content

WARNING You're browsing the documentation for an old version of LARAVEL-AUDITABLE. Consider upgrading your project to laravel-auditable 4.0.

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();