public function youtube($id, array $options = [])
    {
        $options = optionsParser($options, [
            'allowfullscreen' => 'allowfullscreen',
            'height' => 480,
            'ratio' => '16by9',
            'width' => 640,
        ]);

        return self::iframe(sprintf('https://www.youtube.com/embed/%s', $id), $options->toArray());
    }
public function youtube($id, array $options = [])
    {
        $options = optionsParser($options, [
            'allowfullscreen' => 'allowfullscreen',
            'height' => 480,
            'ratio' => '16by9',
            'width' => 640,
        ]);

        return self::iframe(sprintf('https://www.youtube.com/embed/%s', $id), $options->toArray());
    }
public function youtube ( $ id , array $ options = [ ] ) { $ options = optionsParser ( $ options , [ 'allowfullscreen' => 'allowfullscreen' , 'height' => 480 , 'ratio' => '16by9' , 'width' => 640 , ] ) ; return self :: iframe ( sprintf ( 'https://www.youtube.com/embed/%s' , $ id ) , $ options -> toArray ( ) ) ; }
Adds a YouTube video.

You can use the `$ratio` option (valid values: `16by9` or `4by3`) to
create a responsive embed.
@param string $id YouTube video ID
@param array $options Array of options and HTML attributes
@return string
@uses iframe()
Adds a YouTube video .