pageon / html-meta
Manage HTML meta tags in PHP
2.0.1
2017-05-25 14:14 UTC
Requires
- php: ^7.0
Requires (Dev)
- larapack/dd: ^1.1
- phpunit/phpunit: ^6.0
README
Basic usages
$meta = new Meta(); $meta->charset('UTF-8'); $meta->name('title', 'Hello World'); $meta->httpEquiv('Expires', '5000'); $meta->link('next', 'http://lorem.ipsum/?page=3'); $meta->title('Title'); $meta->description('My Description'); $meta->image('/path/to/image.jpeg');
Using it as an injectable service
class MyService { public function __construct(Meta $meta) { $meta->image($this->image->getThumbnail()); } }
Rendering
$html = $meta->render();
{{ meta->render() }}