Ejemplo n.º 1
0
 /**
  * @return string
  */
 public function renderHtml()
 {
     if ($this->language === 'Markdown') {
         return ContentParser::transform($this->content);
     }
     return "<pre><code>" . $this->content . "\n</code></pre>";
 }
Ejemplo n.º 2
0
 /**
  * @return string
  */
 public function renderHtml()
 {
     return ContentParser::transform($this->body);
 }
Ejemplo n.º 3
0
 private function renderMarkdown()
 {
     if ($this->updatedAt == Cache::get('markdown.updated_at.' . $this->id)) {
         return Cache::get('markdown.' . $this->id);
     }
     $markdown = ContentParser::transform($this->content);
     Cache::forever('markdown.' . $this->id, $markdown);
     Cache::forever('markdown.updated_at.' . $this->id, $this->updatedAt);
     return $markdown;
 }