From 217f6b3ee9fa60e4b6b2b54c929168354acd4cbc Mon Sep 17 00:00:00 2001 From: Michael Chrisco Date: Mon, 28 Mar 2016 11:26:43 -0700 Subject: [PATCH] init README --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..859c0f8 --- /dev/null +++ b/README.md @@ -0,0 +1,22 @@ +# Read Only Laravel 5 Models +The Read only trait Monkey Patches Laravel models to not save, delete or modify models. +Ideally, this would be used in addition to DB permissions to ensure Users and Developers cannot write to a Legacy system of some kind. + +This is only a simple demonstration of the model. +## To use: + +```php +set_user_name('bob'); +$result = $legacyUser->save(); +//User is not saved and $result is false. + ?> +```