apility / opengraph
OpenGraph helper class
v1.0.4
2019-11-13 10:32 UTC
Requires
- tightenco/collect: ^6.3
Requires (Dev)
- brainmaestro/composer-git-hooks: dev-master
- phpunit/phpunit: ^8.2@dev
- squizlabs/php_codesniffer: ^3.0@dev
This package is auto-updated.
Last update: 2024-11-13 23:44:48 UTC
README
OpenGraph is a helper class for generating Open Graph meta tags.
Installation
Use the package manager Composer to install OpenGraph.
composer require apility/opengraph
Usage
use Apility\OpenGraph\OpenGraph; $og = new OpenGraph; $og->addProperty('title', 'Hello World'); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <?php print($og->toMetaTags()); ?> <title>Document</title> </head> <body> <h1>Hello World</h1> </body> </html>