コード例 #1
0
 /**
  * Try loading eloquent cache
  *
  * @return void
  */
 protected function tryLoadingEloquentCache()
 {
     $this->app->booted(function () {
         $array = (array) @(include_once EloquentCacheCommand::getCachedEloquentPath());
         if (!empty($array)) {
             FasterModel::loadArrayIntoCachedMutatorAttributes($array);
         }
     });
 }
コード例 #2
0
 /**
  * Find all eloquent models and bootstrap them for cache
  *
  * @return void
  */
 protected function loadAllEloquentModels()
 {
     foreach ($this->finder->find() as $eloquentClass) {
         $this->info("Loaded : [" . $eloquentClass . "]");
         FasterModel::cacheMutatedAttributes($eloquentClass);
     }
 }