From 5be58c301676a76b1ee1b5e3cbcda0afcb1bec2e Mon Sep 17 00:00:00 2001 From: Marcos Martins de Queiroz Date: Tue, 4 May 2021 14:50:00 -0300 Subject: [PATCH] fix(useSoftDeletes)make model I noticed that when using spark make: model the variable useSoftDeletes is being generated in the singular, useSoftDelete, which causes an error when setting to TRUE, when executing $model->delete (1), the record is being permanently deleted. --- system/Commands/Generators/Views/model.tpl.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/Commands/Generators/Views/model.tpl.php b/system/Commands/Generators/Views/model.tpl.php index 255c56dd5d68..416c7c3b67e2 100644 --- a/system/Commands/Generators/Views/model.tpl.php +++ b/system/Commands/Generators/Views/model.tpl.php @@ -12,7 +12,7 @@ class {class} extends Model protected $useAutoIncrement = true; protected $insertID = 0; protected $returnType = '{return}'; - protected $useSoftDelete = false; + protected $useSoftDeletes = false; protected $protectFields = true; protected $allowedFields = [];