Example #1
0
 /**
  * @param SeoEntity $seo
  */
 protected function handle(SeoEntity $seo)
 {
     //add the facebook app id to enable insights.
     $type = $seo->getSeoTypeFacebook();
     $this->addProperty('type', $type);
     $this->addProperty('title', $seo->getSeoTitle());
     $this->addProperty('description', $seo->getSeoDescription());
     if ($type == 'article') {
         if ($seo->publish_at) {
             $this->addProperty('article:published_time', $seo->publish_at->format(DATE_ATOM));
         }
         $this->addProperty('article:modified_time', $seo->updated_at->format(DATE_ATOM));
     }
     if ($image = $seo->getSeoImage()) {
         $this->addProperty('image', asset($image->path));
     }
 }