Download the PHP package fomvasss/laravel-meta-tags without Composer
On this page you can find all versions of the php package fomvasss/laravel-meta-tags. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-meta-tags
Recommended: use fomvasss/laravel-seo.
Laravel Meta Tags
Support
If this package is useful to you, consider supporting its development:
USDT TRC20 address:
THLgp6DxiAtbNHvgnKV56vk1L38UuUagKf
This package lets you manage meta tags and SEO fields from Laravel controllers and Blade templates.
Installation
Run from the command line:
Publish and Configure
1) Publish assets from the command line:
- A configuration file will be published to
config/meta-tags.php. - A migration file will be published to
database/migrations/DATE_NOW_create_meta_tags_table.php. - A customizable Blade template file will be published to
resources/views/vendor/meta-tags/tags.blade.php.
2) Adjust published assets:
- Set available tags in
config/meta-tags.php(uncomment what you need). - Optionally set your own meta tag model class in
config/meta-tags.php. - Edit the
meta_tagsmigration and uncomment the fields you need.
3) Run migration:
Upgrading
When upgrading from v2 to v3, please see the UPGRADING.md
Integration & Usage
Usage in Eloquent models: app/Models/Article.php
Add Metatagable trait in your entity model:
Controller example: app/Http/Controllers/ArticleController.php
Using the MetaTag facade in controllers: app/Http/Controllers/ArticleController.php
For the package to work correctly, store only the URL path in the path field (without domain), with slashes trimmed (/).
Example:
https://site.com/some/pages/?page=23=>some/pageshttps://site.com/some/pages=>/
Using the MetaTag facade in Blade templates: resources/views/layouts/app.blade.php
Simple and efficient:
Or output one by one manually:
Another example: resources/views/articles/show.blade.php
And you can set meta tags right in the template:
Similarly:
Links
All versions of laravel-meta-tags with dependencies
illuminate/support Version >=5.8 <14.0
illuminate/database Version >=5.8 <14.0
illuminate/view Version >=5.8 <14.0