Skip to content

Commit dbfe237

Browse files
author
Pantea Marius-ciclistu
committed
Support property hooks in BadeModelAttributes class
1 parent a943cd9 commit dbfe237

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Models/Attributes/BaseModelLazyAttributes.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,30 +26,30 @@ public function __construct(
2626
*/
2727
public function __get(string $key): mixed
2828
{
29-
return $this->getBaseModelAttributes()->__get($key);
29+
return $this->getBaseModelAttributes()->{$key};
3030
}
3131

3232
public function __set(string $key, mixed $value): void
3333
{
34-
$this->getBaseModelAttributes()->__set($key, $value);
34+
$this->getBaseModelAttributes()->{$key} = $value;
3535
}
3636

3737
public function __isset(string $key): bool
3838
{
39-
return $this->getBaseModelAttributes()->__isset($key);
39+
return isset($this->getBaseModelAttributes()->{$key});
4040
}
4141

4242
public function __unset(string $key): void
4343
{
44-
$this->getBaseModelAttributes()->__unset($key);
44+
unset($this->getBaseModelAttributes()->{$key});
4545
}
4646

4747
/**
4848
* @throws \Throwable
4949
*/
5050
public function __call(string $method, array $parameters): mixed
5151
{
52-
return $this->getBaseModelAttributes()->__call($method, $parameters);
52+
return $this->getBaseModelAttributes()->{$method}(...$parameters);
5353
}
5454

5555
protected function getBaseModelAttributes(): AbstractBaseModelAttributes

0 commit comments

Comments
 (0)