public function setTextAttribute($text) { $text = str_replace(' ', ' ', $text); if ($this->slotname === 'standfirst') { $siteText = $text = strip_tags($text); } else { $embera = new Embera(); $text = Str::makeInternalLinksRelative($text); $siteText = Str::StorifyEmbed($embera->autoEmbed($text)); } $this->attributes['text'] = $text; $this->attributes['site_text'] = $siteText; }
public function getVideoAttribute() { $embera = new Embera(array('params' => array('width' => 800, 'height' => 420))); return $embera->autoEmbed($this->video_url); }