PHPackages                             hareland/laravel-immutable-attributes - 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. hareland/laravel-immutable-attributes

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

hareland/laravel-immutable-attributes
=====================================

Make laravel model attributes immutable

v1.0.2(1y ago)11.2kMITPHPPHP ^8.1CI passing

Since Oct 18Pushed 1y ago1 watchersCompare

[ Source](https://github.com/hareland/laravel-immutable-attributes)[ Packagist](https://packagist.org/packages/hareland/laravel-immutable-attributes)[ RSS](/packages/hareland-laravel-immutable-attributes/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (7)Versions (4)Used By (0)

[![Build](https://github.com/hareland/laravel-immutable-attributes/actions/workflows/pest.yml/badge.svg)](https://github.com/hareland/laravel-immutable-attributes/actions/workflows/pest.yml)[![Total Downloads](https://camo.githubusercontent.com/254a9a32eb2ba24eb41fe052a672e2c72ad8a6c5579e2d8d5a096e5f74a9cf73/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f686172656c616e642f6c61726176656c2d696d6d757461626c652d617474726962757465732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/hareland/laravel-immutable-attributes)

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

[](#laravel-immutable-model-attributes)

Create immutable attributes on your Laravel models. Simply use the trait.

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

[](#installation)

**Requirements**: PHP 8.1+ and Laravel 8+

```
composer require hareland/laravel-immutable-attributes
```

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

[](#define-immutable-attributes)

Define the attributes to be immutable on your model:

```
