fly 4 tahun lalu
induk
melakukan
8bf69a1913
1 mengubah file dengan 3 tambahan dan 1 penghapusan
  1. 3 1
      src/Controllers/BaseControllerConfig.php

+ 3 - 1
src/Controllers/BaseControllerConfig.php

@@ -24,11 +24,13 @@ use Illuminate\Database\Eloquent\Model;
  */
 trait BaseControllerConfig
 {
+    private $field = [];
     public function __get($name)
     {
         if (!isset($this->field[$name])) {
-            return $this->$name();
+            $this->field[$name] = $this->$name();
         }
+        return $this->field[$name];
     }
 
     protected function channel(): Model