From 60337c1dd1e327a37b37862c7b8e328a417b8155 Mon Sep 17 00:00:00 2001 From: Michael Nabil <46572405+michaelnabil230@users.noreply.github.com> Date: Mon, 17 Apr 2023 07:04:23 +0200 Subject: [PATCH] Update Location.php --- src/Location.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Location.php b/src/Location.php index 45b94c9..683ce31 100644 --- a/src/Location.php +++ b/src/Location.php @@ -82,12 +82,12 @@ public function setAttribute($key, $value) public function getAttribute($key) { $value = Arr::get($this->attributes, $key); - + + $method = 'get' . Str::studly($key) . 'Attribute'; + // First we will check for the presence of a mutator for the set operation // which simply lets the developers tweak the attribute as it is set. - if (method_exists($this, 'get' . Str::studly($key) . 'Attribute')) { - $method = 'get' . Str::studly($key) . 'Attribute'; - + if (method_exists($this, $method)) { return $this->{$method}($value); }