fly hace 4 años
padre
commit
8bf69a1913
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  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