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
Development and support of this package is discontinued! Use a better solution fomvasss/laravel-seo
Laravel Meta Tags
With this package you can manage meta-tags and SEO-fields from Laravel controllers and "blade" template.
Installation
Run from the command line:
Publish and settings
1) Publish assets - run this on the command line:
- A configuration file will be publish to
config/meta-tags.php
. - A migration file will be publish to
database/migrations/DATE_NOW_create_meta_tags_table.php
. - A customizable blade template file will be publish to
resources/views/vondor/meta-tags/tags.blade.php
.
2) Edit assets:
- Set available tags in
config/meta-tags.php
- uncomment needed - If needed - set own model class for meta-tags in
config/meta-tags.php
- Edit migration
meta_tags
file - set available field tags - uncomment needed
3) Run migration
Upgrading
When upgrading from v2 to v3, please see the UPGRADING.md
Integrate & usage
Usage in Eloquent models: app/Models/Article.php
Add Metatagable
trait in your entity model:
Usage facade MetaTag
in controllers: app/Http/Controllers/ArticleController.php
For the package to work correctly, you must save to the database, in the path
field, only the url-path itself, without a domain and trim slash'es (/
)
Example:
https://site.com/some/pages/?page=23
=>some/pages
https://site.com/some/pages
=>/
Usage facade MetaTag
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|^6.0|^7.0|^8.0|^9.0
illuminate/database Version ^5.8|^6.0|^7.0|^8.0|^9.0
illuminate/view Version ^5.8|^6.0|^7.0|^8.0|^9.0