PHPackages                             dfox288/culpa - 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. dfox288/culpa

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

dfox288/culpa
=============

Adds Blameable support to Eloquent models in Laravel 7+

10.0.1(3y ago)04.2k1MITPHP

Since Jan 8Pushed 3y agoCompare

[ Source](https://github.com/dfox288/culpa-laravel-5)[ Packagist](https://packagist.org/packages/dfox288/culpa)[ Docs](https://github.com/nstapelbroek/culpa-laravel-5)[ RSS](/packages/dfox288-culpa/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (16)Used By (1)

Updated for Laravel 9+ and new bigInt requirements for foreign keys
-------------------------------------------------------------------

[](#updated-for-laravel-9-and-new-bigint-requirements-for-foreign-keys)

Use BlueprintBigInt as Blueprint class

Culpa for Laravel 5 &amp; 6 [![Build Status](https://camo.githubusercontent.com/98ce07a597f926c394361a42fe57a97a3cc1ab5b31944f81a2d0e53d3f5b53c8/68747470733a2f2f7472617669732d63692e6f72672f6e73746170656c62726f656b2f63756c70612d6c61726176656c2d352e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/nstapelbroek/culpa-laravel-5) [![Latest Stable Version](https://camo.githubusercontent.com/ea3f45a6d45856ad237aabf0018846ba654827e0e305fe87d97de035c3b757ab/68747470733a2f2f706f7365722e707567782e6f72672f6e73746170656c62726f656b2f63756c70612f762f737461626c653f666f726d61743d706c6173746963)](https://packagist.org/packages/nstapelbroek/culpa) [![License](https://camo.githubusercontent.com/42dea205f48f6d8533371938601d30ec1fa2fb69ba74971412065179961be502/68747470733a2f2f706f7365722e707567782e6f72672f6e73746170656c62726f656b2f63756c70612f6c6963656e7365)](https://packagist.org/packages/nstapelbroek/culpa)
=============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#culpa-for-laravel-5--6---)

Blameable extension for Laravel 5 &amp; 6 Eloquent ORM models. This extension automatically adds references to the authenticated user when creating, updating or soft-deleting a model.

**Disclaimer**: I've created this repository because I didn't want to include a dev-master version of [the original fork](https://github.com/nstapelbroek/culpa) in my composer.json. Once the original [pull request](https://github.com/rmasters/culpa/pull/14) gets merged, this package will probably become deprecated and you'll be best of switching back within a year. Due to changes in the namespace and directory structure this package is not backwards compatible with [the original Culpa for laravel &lt; 4](https://github.com/rmasters/culpa).

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

[](#installation)

To install the package in your project:

1. Run `composer require nstapelbroek/culpa`,
2. Add to the `providers` list in config/app.php: `"Culpa\CulpaServiceProvider"`,
3. Publish the configuration to your application: `php artisan vendor:publish`

Usage
-----

[](#usage)

You can add auditable fields on a per-model basis by adding a protected property and a model observer. The property `$blameable` contains events you wish to record - at present this is restricted to created, updated and deleted - which function the same as Laravel's timestamps.

```
use Culpa\Traits\Blameable;
use Culpa\Traits\CreatedBy;
use Culpa\Traits\DeletedBy;
use Culpa\Traits\UpdatedBy;
use Illuminate\Database\Eloquent\Model;

class Comment extends Model
{
    use Blameable, CreatedBy, UpdatedBy, DeletedBy;

    protected $blameable = array('created', 'updated', 'deleted');

    // Other model logic here
}
```

- On create, the authenticated user will be set in `created_by`,
- On create and update, the authenticated user will be set in `updated_by`,
- If the model was soft-deletable, the authenticated user will be set in `deleted_by` on deletion.

To activate the automatic updating of these fields, you need to add the blamable trait to the model. That's it! Need more tweak options for Culpa? take a look at the \[Tweaks and Configuration docs\](docs/1. Tweaks and Configuration.md).

License
-------

[](#license)

Culpa is released under the [MIT License](LICENSE).

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 57.3% 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 ~217 days

Recently: every ~69 days

Total

13

Last Release

1176d ago

Major Versions

3.0.0 → 4.0.02020-02-29

4.0.0 → 7.0.02020-07-01

7.0.0 → 8.0.02020-12-17

8.0.0 → 9.0.02022-05-17

9.1.1 → 10.0.02023-02-28

### Community

Maintainers

![](https://www.gravatar.com/avatar/d8b4fb8278882a520e1a3e27c0d183c5597e4ea45ead46d08418e2a6a324e022?d=identicon)[dfox288](/maintainers/dfox288)

---

Top Contributors

[![nstapelbroek](https://avatars.githubusercontent.com/u/3368018?v=4)](https://github.com/nstapelbroek "nstapelbroek (71 commits)")[![rmasters](https://avatars.githubusercontent.com/u/34284?v=4)](https://github.com/rmasters "rmasters (48 commits)")[![casberkman1](https://avatars.githubusercontent.com/u/25476495?v=4)](https://github.com/casberkman1 "casberkman1 (2 commits)")[![dfox288](https://avatars.githubusercontent.com/u/879706?v=4)](https://github.com/dfox288 "dfox288 (2 commits)")[![carnevalle](https://avatars.githubusercontent.com/u/54747?v=4)](https://github.com/carnevalle "carnevalle (1 commits)")

---

Tags

laravelBlameablecreated\_byupdated\_bydeleted\_byBlamable

### Embed Badge

![Health badge](/badges/dfox288-culpa/health.svg)

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

###  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)[rtconner/laravel-likeable

Trait for Laravel Eloquent models to allow easy implementation of a 'like' or 'favorite' or 'remember' feature.

394388.0k5](/packages/rtconner-laravel-likeable)[richan-fongdasen/eloquent-blameable

Blameable behavior implementation for your Eloquent Model in Laravel

34213.1k3](/packages/richan-fongdasen-eloquent-blameable)[rmasters/culpa

Adds Blameable support to Eloquent models in Laravel

242.2k](/packages/rmasters-culpa)[digitalcloud/laravel-blameable

Laravel package allow you to add created/updated by attributes on eloquent models

1543.3k4](/packages/digitalcloud-laravel-blameable)

PHPackages © 2026

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