From 54bbf54ffa8bbd9beb093531c37e7db12c5e7bf8 Mon Sep 17 00:00:00 2001 From: Michael Chrisco Date: Tue, 6 Dec 2016 11:16:18 -0800 Subject: [PATCH] Readme Update with Laravel 5.3 methods --- README.md | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2b23c31..b5ff079 100644 --- a/README.md +++ b/README.md @@ -10,13 +10,51 @@ This is only a simple demonstration of the model. require_once('src/ReadOnlyTrait.php'); //Or register under your config/App.php // use MichaelAChrisco\ReadOnlyTrait; //optional use Illuminate\Database\Eloquent\Model; -class User extends Illuminate\Database\Eloquent\Model { +class User extends Model { use MichaelAChrisco\ReadOnly\ReadOnlyTrait; } $legacyUser = new User; $legacyUser->set_user_name('bob'); + $result = $legacyUser->save(); //User is not saved and $result is false. ?> ``` + +## Methods that will return false: + + * create + * forceCreate + * save + * update + * firstOrCreate + * firstOrNew + * delete + * destroy + * restore + * forceDelete + +## TODO: + * performDeleteOnModel + * push + * saveOrFail + * finishSave + * performUpdate + * performInsert(??) + * insertAndSetId(??) + * touch + * Add in a PR for any other methods you can find! + + +### registerModelEvents( look into best way to implement) + * saving + * saved + * updating + * updated + * creating + * created + * deleting + * deleted + +###