PHPackages                             mattyg/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. [Templating &amp; Views](/categories/templating)
4. /
5. mattyg/meta

ActiveLibrary[Templating &amp; Views](/categories/templating)

mattyg/meta
===========

A package that makes it easy to add meta tags to your views.

2.1.6(12y ago)637MITPHPPHP &gt;=5.3.0

Since Mar 13Pushed 12y ago1 watchersCompare

[ Source](https://github.com/djmattyg007/meta)[ Packagist](https://packagist.org/packages/mattyg/meta)[ Docs](https://github.com/djmattyg007/meta)[ RSS](/packages/mattyg-meta/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (12)Used By (0)

\#Meta

A package that makes it easy to add meta tags to your views. This is a fork of Ryan Nielson's original package that does not include any framework-specific code.

This package will work in any PHP application.

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

[](#installation)

Run the following Composer command in your terminal, or simply add `"mattyg/meta": "2.1.*"` to your composer.json file:

```
composer require mattyg/meta

```

Then update Composer from the terminal:

```
composer update

```

That's it!

Usage
-----

[](#usage)

To set meta tag values, you will use the `set(array())` method on the Meta instance. Just pass this Meta object around to persist the set values.

```
$meta = new \RyanNielson\Meta\Meta;

// Example #1 - Basic setting of values
$meta->set(array("title" => "Page Title", "description" => "Page Description", "keywords" => array("great", "site")));

// Example #2 - Setting nested values. This will render tags with names like og:title and og:description
$meta->set(array("title" => "Page Title", "og" => array("title" => "OG Title", "description" => "OG Description")));

```

To display your meta tags using the set values, you will use the `display(array())` function on your Meta object.:

```
$meta->display();

// Displaying Example #1 from above

// Displaying Example #2 from above

```

The display function also accepts an array of default values. These will be used when displaying your meta tags if a value is not set already using `set()`.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 56.3% 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.

###  Release Activity

Cadence

Every ~4 days

Total

11

Last Release

4403d ago

Major Versions

1.0.2 → 2.0.02014-03-20

### Community

Maintainers

![](https://www.gravatar.com/avatar/29e8622a72b856256e1b0f9e5ba9480444c6391e6e80a48eeb52fc4118eacf06?d=identicon)[djmattyg007](/maintainers/djmattyg007)

---

Top Contributors

[![RyanNielson](https://avatars.githubusercontent.com/u/794694?v=4)](https://github.com/RyanNielson "RyanNielson (18 commits)")[![mwgamble](https://avatars.githubusercontent.com/u/4494785?v=4)](https://github.com/mwgamble "mwgamble (8 commits)")[![djmattyg007](https://avatars.githubusercontent.com/u/489338?v=4)](https://github.com/djmattyg007 "djmattyg007 (6 commits)")

---

Tags

viewmeta

### Embed Badge

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

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

###  Alternatives

[eftec/bladeone

The standalone version Blade Template Engine from Laravel in a single php file

8208.4M87](/packages/eftec-bladeone)[laracasts/presenter

Simple view presenters

8643.4M46](/packages/laracasts-presenter)[jenssegers/blade

The standalone version of Laravel's Blade templating engine for use outside of Laravel.

8661.2M109](/packages/jenssegers-blade)[backpack/generators

Generate files for laravel projects

3122.6M18](/packages/backpack-generators)[laminas/laminas-view

Fast and type safe HTML templating library with a flexible plugin system supporting multistep template composition

7526.3M230](/packages/laminas-laminas-view)[friendsofcake/cakephp-csvview

A CSV View class for CakePHP

1762.5M3](/packages/friendsofcake-cakephp-csvview)

PHPackages © 2026

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