PHPackages                             zablockibros/laravel-immutable - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. zablockibros/laravel-immutable

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

zablockibros/laravel-immutable
==============================

Make model attributes immutable

001[1 issues](https://github.com/zablockibros/laravel-immutable/issues)PHP

Since Mar 4Pushed 7y ago1 watchersCompare

[ Source](https://github.com/zablockibros/laravel-immutable)[ Packagist](https://packagist.org/packages/zablockibros/laravel-immutable)[ RSS](/packages/zablockibros-laravel-immutable/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Immutable Attributes
============================

[](#laravel-immutable-attributes)

Make attributes on your Laravel models immutable...i.e. after the model is created, the value of the immutable attributes cannot change when updating records with Eloquent.

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

[](#installation)

**Requirements**: This package requires PHP 7.1.3 or higher and Laravel 5.7

```
$ composer require zablockibros/laravel-immutable
```

The package will automatically register its service provider.

Define Immutable Attributes
---------------------------

[](#define-immutable-attributes)

Define the attributes to be immutable on your model:

```
