Author: ARCANEDEV (arcanedev.maroc@gmail.com)
Inheritance: implements Arcanedev\SeoHelper\Contracts\Helpers\Meta
Example #1
0
 /**
  * Add a meta to collection.
  *
  * @param  string  $name
  * @param  string  $content
  *
  * @return \Arcanedev\SeoHelper\Entities\MetaCollection
  */
 public function add($name, $content)
 {
     $meta = Meta::make($name, $content);
     if ($meta->isValid() && !$this->isIgnored($name)) {
         $this->put($meta->key(), $meta);
     }
     return $this;
 }
Example #2
0
 /**
  * Render the tag.
  *
  * @return string
  */
 public function render()
 {
     if (!$this->hasContent()) {
         return '';
     }
     return Meta::make($this->name, $this->get())->render();
 }
Example #3
0
 /**
  * Make a meta and add it to collection.
  *
  * @param  string  $name
  * @param  string  $content
  *
  * @return \Arcanedev\SeoHelper\Bases\MetaCollection
  */
 protected function addMeta($name, $content)
 {
     $meta = Meta::make($name, $content, $this->nameProperty, $this->prefix);
     $this->put($meta->key(), $meta);
     return $this;
 }