From ea0a714e0fe55c54300dbb9c0666ffecdabae352 Mon Sep 17 00:00:00 2001 From: Eduardo Salguero Date: Thu, 24 Nov 2016 11:52:54 +0100 Subject: [PATCH] Hot fix: restore deleted_at to read only columns --- src/Abstractor/Eloquent/Model.php | 2 +- src/Abstractor/Eloquent/Relation/MiniCrud.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Abstractor/Eloquent/Model.php b/src/Abstractor/Eloquent/Model.php index 5b46330..2e338d5 100644 --- a/src/Abstractor/Eloquent/Model.php +++ b/src/Abstractor/Eloquent/Model.php @@ -391,7 +391,7 @@ public function getEditFields($withForeignKeys = false, $arrayKey = 'main') protected function getReadOnlyColumns() { - $columns = [LaravelModel::CREATED_AT, LaravelModel::UPDATED_AT]; + $columns = [LaravelModel::CREATED_AT, LaravelModel::UPDATED_AT, 'deleted_at']; $columns[] = $this->dbal->getModel()->getKeyName(); diff --git a/src/Abstractor/Eloquent/Relation/MiniCrud.php b/src/Abstractor/Eloquent/Relation/MiniCrud.php index 2e01a59..626a65d 100644 --- a/src/Abstractor/Eloquent/Relation/MiniCrud.php +++ b/src/Abstractor/Eloquent/Relation/MiniCrud.php @@ -116,7 +116,7 @@ public function getEditFieldsBase() $this->readConfig('edit'); if (!empty($columns)) { - $readOnly = [Model::CREATED_AT, Model::UPDATED_AT]; + $readOnly = [Model::CREATED_AT, Model::UPDATED_AT, 'deleted_at']; //Add field for model deletion $config = [