defenestrator/laravel-immutable-eloquent

Immutable trait for Laravel Eloquent models.

dev-main 2020-10-10 17:12 UTC

This package is auto-updated.

Last update: 2024-05-11 00:53:27 UTC


README

This package is not optimal, but it may be sufficient for some

The hashedContent() method returns 'state' by default

The hashColumn() method returns 'hash' by default

Use of created_at is acceptable but not required

Use of updated_at implies mutability, so using

Blueprint::timestamps() is discouraged

Hash checking may be disabled simply by

setting static::$checkHash = false

in the model's boot() method.

This may not be a good idea.

Typing is not the bottleneck, endeavor to be thoughtful