Create meta helper
This commit is contained in:
1 parent
0d4c5f4e9d
commit
3c2e8c162f
2 files changed
+55
-25
No files matched your search
@@ -399,4 +399,21 @@ class HtmlBuilder {
|
||||
return $safe;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a meta tag.
|
||||
*
|
||||
* @param string $name
|
||||
* @param string $content
|
||||
* @param array $attributes
|
||||
* @return string
|
||||
*/
|
||||
public function meta($name, $content, array $attributes = [])
|
||||
{
|
||||
$defaults = compact('name', 'content');
|
||||
|
||||
$attributes = array_merge($defaults, $attributes);
|
||||
|
||||
return '<meta'.$this->attributes($attributes).'>'.PHP_EOL;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user