PHPackages                             quaidesbalises/meta - 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. quaidesbalises/meta

ActiveLibrary

quaidesbalises/meta
===================

Manage your meta tags for your application

07.4k↓100%PHP

Since Aug 13Pushed 5y agoCompare

[ Source](https://github.com/quaidesbalises/laravel-meta)[ Packagist](https://packagist.org/packages/quaidesbalises/meta)[ RSS](/packages/quaidesbalises-meta/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel meta manager
====================

[](#laravel-meta-manager)

Manage your meta tags and displays them on your blade layout.

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

[](#installation)

```
composer require quaidesbalises/meta
```

Configuration
-------------

[](#configuration)

You can override the default configuration. First publish the configuration:

```
php artisan vendor:publish --provider="Qdb\Meta\MetaServiceProvider" --tag=config
```

This will copy the default config to **config/meta.php** where you can edit it.

The configuration file contains default keys and values array.

```
'default' => [

  /*
  * Default display keys which needs to be print everytime
  * if not exists, it takes the most valuable default value
  * g.e : og:title takes the title default value
  * g.e : twitter:title takes the og:title default value
  */
  'keys' => [
    'title',
    'description',
    'robots',
    'og:title',
    'og:image',
    'og:url',
    'og:description',
    'twitter:card',
    'twitter:title',
    'twitter:description',
    'twitter:image',
    'twitter:url'
  ],

  /**
  * Default values for the given keys
  */
  'values' => [
    'og:image' => 'images/og-image.jpg',
    'twitter:card' => 'summary_large_image',
  ]

]
```

Usage
-----

[](#usage)

### Set meta tags

[](#set-meta-tags)

```
Meta::set('title', 'My title')
Meta::set('description', 'My description')
Meta::set('og:image', '/images/image.jpg')
```

**and** / **or**

```
Meta::set([
  'title' => 'My title',
  'description' => 'My description',
  'og:image' => '/images/image.jpg'
])
```

### Display meta tags

[](#display-meta-tags)

```
@meta('title')
@meta('description')
@meta('og:image')

```

**and / or**

```
@metas(['title', 'description', 'og:image'])
```

The example above print :

```
My title

```

Also, you can display all metas at once :

```
@metas

```

Please note that this blade directive will takes care of the **default display keys which are set on your configuration file**. You are free to remove or adding keys to the array as you wants. In case of a specify key was not set, it retrieves the most logic value for you **based on your existing values**.

This is a valuable feature to prevent you to rewrite values for tags like `og:title`, `og:description`, `twitter:title` etc ...

Given the default keys on the configuration file display above, let's see just below a real world example.

Example
-------

[](#example)

#### Model :

[](#model-)

```
class Page extends Model
{
  public function setMetas()
  {
    Meta::set([
      'title' => $this->seo_title,
      'description' => $this->seo_desc,
      'robots' => $this->seo_robots
    ]);
  }
}
```

#### Controller :

[](#controller-)

```
class PagesController extends Controller
{
  public function show(Page $page)
  {
    $page->setMetas();
    return view('pages.page', compact('page'));
  }
}
```

#### Blade view :

[](#blade-view-)

```
@metas

```

##### Output :

[](#output-)

```
Home page

```

Given the display wanted fields which are set on your configuration file and base on available values `og:` and `twitter:` are automatically filled.

Next steps
----------

[](#next-steps)

- Add tests

Contributing
------------

[](#contributing)

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License
-------

[](#license)

[MIT](https://choosealicense.com/licenses/mit/)

###  Health Score

22

—

LowBetter than 25% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/7aa23b2129b2b4a23d2c00904da0f4f4fce07f2998de8981ef382659aad76cbd?d=identicon)[quaidesbalises](/maintainers/quaidesbalises)

---

Top Contributors

[![francoisdusautoir](https://avatars.githubusercontent.com/u/4410171?v=4)](https://github.com/francoisdusautoir "francoisdusautoir (9 commits)")

### Embed Badge

![Health badge](/badges/quaidesbalises-meta/health.svg)

```
[![Health](https://phpackages.com/badges/quaidesbalises-meta/health.svg)](https://phpackages.com/packages/quaidesbalises-meta)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
