PHPackages                             victord11/laravel-meta-tags - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. victord11/laravel-meta-tags

ActiveLibrary

victord11/laravel-meta-tags
===========================

A package to manage Header Meta Tags for SS

7.6(5mo ago)110.5kMITJavaScriptPHP ^8.0CI passing

Since Aug 14Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/VictoRD11/laravel-meta-tags)[ Packagist](https://packagist.org/packages/victord11/laravel-meta-tags)[ RSS](/packages/victord11-laravel-meta-tags/feed)WikiDiscussions master Synced yesterday

READMEChangelog (10)Dependencies (4)Versions (29)Used By (0)

Laravel Meta Tags
=================

[](#laravel-meta-tags)

With this package you can manage header Meta Tags from Laravel controllers.

---

Installation
------------

[](#installation)

- [Laravel MetaTags on Packagist](https://packagist.org/packages/victord11/laravel-meta-tags)
- [Laravel MetaTags on GitHub](https://github.com/VictoRD11/laravel-meta-tags)

From the command line run

```
$ composer require victord11/laravel-meta-tags

```

Once Meta Tags is installed you need to register the service provider with the application. Open up `config/app.php` and find the `providers` key.

```
'providers' => array(

    VictoRD11\LaravelMetaTags\MetaTagsServiceProvider::class,

)
```

Meta Tags also ships with a facade which provides the static syntax for creating collections. You can register the facade in the `aliases` key of your `config/app.php` file.

```
'aliases' => array(

    'MetaTag'   => VictoRD11\LaravelMetaTags\Facades\MetaTag::class,

)
```

### Publish the configurations

[](#publish-the-configurations)

Run this on the command line from the root of your project:

```
$ php artisan vendor:publish --provider="VictoRD11\LaravelMetaTags\MetaTagsServiceProvider"

```

A configuration file will be publish to `config/meta-tags.php`.

Twitter Cards and OpenGraph
---------------------------

[](#twitter-cards-and-opengraph)

Various settings for these options can be found in the `config/meta-tags.php` file.

**Twitter Cards**

```
{!! MetaTag::twitterCard() !!}
```

**OpenGraph**

```
{!! MetaTag::openGraph() !!}
```

Examples
--------

[](#examples)

#### app/Http/Controllers/Controller.php

[](#apphttpcontrollerscontrollerphp)

```
