sergeybruhin / page-meta
Laravel Page Meta Package
0.1.2
2023-01-22 17:03 UTC
Requires
- php: ^7.4|^8.0
Requires (Dev)
- orchestra/testbench: ^6.0
- phpunit/phpunit: ^9.0
This package is auto-updated.
Last update: 2024-10-22 20:42:57 UTC
README
Basic and simple package to help you generate page meta inside your blade layout.
Installation
You can install the package via composer:
composer require sergeybruhin/page-meta
Compose Page Meta in Controller
$openGraph = PageMeta::openGraphArticle( route('home'), $page->name, $page->description, 'Your site name', ); $openGraph->addImage( 'https://example.com/image/url.png', 100, 100, Image::TYPE_WEBP ); $openGraph->addTags([ 'Some tag', 'And', 'Another Tag' ]); $openGraph->addAuthors([ 'https://example.com/author/some-author', 'https://example.com/author/another', ]);
Render Page Meta
Feel free to render page meta in place you prefer.
@include('page-meta::open-graph')
Template will be rendered if variable $openGraph is set.
Testing (Not yet 💁♂️)
composer test
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email sundaycreative@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.