public function title(string $title) : self
    {
        $title = trim($title);

        if ($this->validate and ! $title) {
            throw new Exception("Open Graph: Invalid title (empty)");
        }

        $this->forget('title');

        $this->tags[] = $this->createTag('title', strip_tags($title));

        return $this;
    }
public function title(string $title) : self
    {
        $title = trim($title);

        if ($this->validate and ! $title) {
            throw new Exception("Open Graph: Invalid title (empty)");
        }

        $this->forget('title');

        $this->tags[] = $this->createTag('title', strip_tags($title));

        return $this;
    }
public function title ( string $ title ) : self { $ title = trim ( $ title ) ; if ( $ this -> validate and ! $ title ) { throw new Exception ( "Open Graph: Invalid title (empty)" ) ; } $ this -> forget ( 'title' ) ; $ this -> tags [ ] = $ this -> createTag ( 'title' , strip_tags ( $ title ) ) ; return $ this ; }
Adds a title tag

@param  string $title
@return OpenGraph
Adds a title tag