PHPackages                             michaelachrisco/readonly - 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. michaelachrisco/readonly

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

michaelachrisco/readonly
========================

Readonly Models for Laravel 5+

v1.1.0(5mo ago)1622.1M↓13.9%15[1 issues](https://github.com/michaelachrisco/ReadOnlyTraitLaravel/issues)5MITPHPPHP &gt;=7.0.0CI passing

Since Dec 9Pushed 1mo ago3 watchersCompare

[ Source](https://github.com/michaelachrisco/ReadOnlyTraitLaravel)[ Packagist](https://packagist.org/packages/michaelachrisco/readonly)[ RSS](/packages/michaelachrisco-readonly/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (16)Used By (5)

[![Total Downloads](https://camo.githubusercontent.com/dd167510da202e127cf386c8a20dd3f9fee53def91f65493fcf51a1cb0881472/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d69636861656c616368726973636f2f726561646f6e6c792e737667)](https://packagist.org/packages/michaelachrisco/readonly)[![build workflow](https://github.com/michaelachrisco/ReadOnlyTraitLaravel/actions/workflows/build.yml/badge.svg)](https://github.com/michaelachrisco/ReadOnlyTraitLaravel/actions/workflows/build.yml/badge.svg)[![Latest Version on Packagist](https://camo.githubusercontent.com/a9a1e4948ad0b0a4d62728a32378796ff91551aee65f597e67179f996728b764/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d69636861656c616368726973636f2f726561646f6e6c792e737667)](https://packagist.org/packages/michaelachrisco/readonly)

Laravel 5+ Read Only Models
===========================

[](#laravel-5-read-only-models)

The read only trait removes the ability to save, delete or modify Laravel models. Ideally, this would be used in addition to DB permissions to ensure users and developers cannot write to a Legacy system.

Install
-------

[](#install)

```
composer require michaelachrisco/readonly

```

To use:
-------

[](#to-use)

```
