diff --git a/src/Eloquent/Model.php b/src/Eloquent/Model.php index 2d985f6..1c66f76 100644 --- a/src/Eloquent/Model.php +++ b/src/Eloquent/Model.php @@ -155,7 +155,7 @@ public function getAttribute($key) } // Dot notation support. - if (Str::contains($key, '.') && Arr::has($this->attributes, $key)) { + if (str_contains($key, '.') && Arr::has($this->attributes, $key)) { return $this->getAttributeValue($key); } @@ -177,7 +177,7 @@ public function getAttribute($key) protected function getAttributeFromArray($key) { // Support keys in dot notation. - if (Str::contains($key, '.')) { + if (str_contains($key, '.')) { return Arr::get($this->attributes, $key); } @@ -195,7 +195,7 @@ public function setAttribute($key, $value) $value = $builder->convertKey($value); } // Support keys in dot notation. - elseif (Str::contains($key, '.')) { + elseif (str_contains($key, '.')) { // Store to a temporary key, then move data to the actual key $uniqueKey = uniqid($key); parent::setAttribute($uniqueKey, $value); diff --git a/src/Query/Builder.php b/src/Query/Builder.php index dd448ed..14036ae 100644 --- a/src/Query/Builder.php +++ b/src/Query/Builder.php @@ -617,7 +617,7 @@ public function insertGetId(array $values, $sequence = null) public function update(array $values, array $options = []) { // Use $set as default operator. - if (! Str::startsWith(key($values), '$')) { + if (! str_starts_with(key($values), '$')) { $values = ['$set' => $values]; } @@ -951,7 +951,7 @@ protected function compileWheres(): array } // Convert id's. - if (isset($where['column']) && ($where['column'] == '_id' || Str::endsWith($where['column'], '._id'))) { + if (isset($where['column']) && ($where['column'] == '_id' || str_ends_with($where['column'], '._id'))) { // Multiple values. if (isset($where['values'])) { foreach ($where['values'] as &$value) {