fly před 4 roky
rodič
revize
8bf69a1913
1 změnil soubory, kde provedl 3 přidání a 1 odebrání
  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