Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eusonlito/laravel-meta
HTML Meta Tags management package available for for Laravel >= 5 (Including 10)
https://github.com/eusonlito/laravel-meta
html laravel meta php tags
Last synced: 6 days ago
JSON representation
HTML Meta Tags management package available for for Laravel >= 5 (Including 10)
- Host: GitHub
- URL: https://github.com/eusonlito/laravel-meta
- Owner: eusonlito
- License: mit
- Created: 2014-08-13T21:38:10.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2024-06-17T14:19:38.000Z (7 months ago)
- Last Synced: 2024-10-18T04:22:56.050Z (3 months ago)
- Topics: html, laravel, meta, php, tags
- Language: JavaScript
- Homepage:
- Size: 322 KB
- Stars: 196
- Watchers: 9
- Forks: 81
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# HTML Meta Tags management package available for Laravel >= 5 (Including 10)
[![Build Status](https://travis-ci.org/eusonlito/laravel-Meta.svg?branch=master)](https://travis-ci.org/eusonlito/laravel-Meta)
[![Latest Stable Version](https://poser.pugx.org/eusonlito/laravel-meta/v/stable.png)](https://packagist.org/packages/eusonlito/laravel-meta)
[![Total Downloads](https://poser.pugx.org/eusonlito/laravel-meta/downloads.png)](https://packagist.org/packages/eusonlito/laravel-meta)
[![License](https://poser.pugx.org/eusonlito/laravel-meta/license.png)](https://packagist.org/packages/eusonlito/laravel-meta)With this package you can manage header Meta Tags from Laravel controllers.
If you want a Laravel <= 4.2 compatible version, please use `v4.2` branch.
## Installation
Begin by installing this package through Composer.
```js
{
"require": {
"eusonlito/laravel-meta": "3.1.*"
}
}
```### Laravel installation
```php
// config/app.php
'providers' => [
'...',
Eusonlito\LaravelMeta\MetaServiceProvider::class
];'aliases' => [
'...',
'Meta' => Eusonlito\LaravelMeta\Facade::class,
];
```Now you have a ```Meta``` facade available.
Publish the config file:
```
php artisan vendor:publish --provider="Eusonlito\LaravelMeta\MetaServiceProvider"
```#### app/Http/Controllers/Controller.php
```php
{!! Meta::get('title') !!}
{!! Meta::tag('robots') !!}
{!! Meta::tag('site_name', 'My site') !!}
{!! Meta::tag('url', Request::url()); !!}
{!! Meta::tag('locale', 'en_EN') !!}{!! Meta::tag('title') !!}
{!! Meta::tag('description') !!}{!! Meta::tag('canonical') !!}
{{-- Print custom section images and a default image after that --}}
{!! Meta::tag('image', asset('images/default-logo.png')) !!}
...
...