public function type(string $type) : self
    {
        $types = [
            'music.song',
            'music.album',
            'music.playlist',
            'music.radio_station',
            'video.movie',
            'video.episode',
            'video.tv_show',
            'video.other',
            'article',
            'book',
            'profile',
            'website',
        ];

        if ($this->validate and ! in_array($type, $types)) {
            throw new Exception("Open Graph: Invalid type '{$type}' (unknown type)");
        }

        $this->forget('type');

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

        return $this;
    }
public function type(string $type) : self
    {
        $types = [
            'music.song',
            'music.album',
            'music.playlist',
            'music.radio_station',
            'video.movie',
            'video.episode',
            'video.tv_show',
            'video.other',
            'article',
            'book',
            'profile',
            'website',
        ];

        if ($this->validate and ! in_array($type, $types)) {
            throw new Exception("Open Graph: Invalid type '{$type}' (unknown type)");
        }

        $this->forget('type');

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

        return $this;
    }
public function type ( string $ type ) : self { $ types = [ 'music.song' , 'music.album' , 'music.playlist' , 'music.radio_station' , 'video.movie' , 'video.episode' , 'video.tv_show' , 'video.other' , 'article' , 'book' , 'profile' , 'website' , ] ; if ( $ this -> validate and ! in_array ( $ type , $ types ) ) { throw new Exception ( "Open Graph: Invalid type '{$type}' (unknown type)" ) ; } $ this -> forget ( 'type' ) ; $ this -> tags [ ] = $ this -> createTag ( 'type' , $ type ) ; return $ this ; }
Adds a type tag.

@param  string $type
@return OpenGraph
Adds a type tag .