예제 #1
0
 /**
  * Render the block
  * @param  Block  $block The block to be rendered
  * @return string        The rendered view of the block or raw text
  */
 public function render(Block $block)
 {
     if (!$this->cache) {
         return $block->render();
     }
     return $this->cache->remember('larablock.' . $block->getName(), config('larablock.cache_ttl'), function () use($block) {
         return $block->render();
     });
 }