diff --git a/src/Database/Concerns/GuardsAttributes.php b/src/Database/Concerns/GuardsAttributes.php new file mode 100644 index 000000000..438085b96 --- /dev/null +++ b/src/Database/Concerns/GuardsAttributes.php @@ -0,0 +1,26 @@ +getGuarded())) { + return false; + } + + return $this->getGuarded() == ['*'] || + ! empty(preg_grep('/^'.preg_quote($key).'$/i', $this->getGuarded())); + } +} diff --git a/src/Database/Model.php b/src/Database/Model.php index 164171b90..1c6b70acd 100644 --- a/src/Database/Model.php +++ b/src/Database/Model.php @@ -1,7 +1,5 @@