PHPackages                             m2collective/laravel-metadata-markup - 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. m2collective/laravel-metadata-markup

ActiveLibrary

m2collective/laravel-metadata-markup
====================================

A package for adding and editing meta tags on a website.

0.2.0(yesterday)03↑2900%MITPHPPHP ^8.3

Since Jul 30Pushed yesterdayCompare

[ Source](https://github.com/m2collective/laravel-metadata-markup)[ Packagist](https://packagist.org/packages/m2collective/laravel-metadata-markup)[ Docs](https://github.com/m2collective/laravel-metadata-markup)[ RSS](/packages/m2collective-laravel-metadata-markup/feed)WikiDiscussions main Synced today

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

Metadata Markup
===============

[](#metadata-markup)

A package for adding and editing meta tags on a website.

[![Laravel](https://camo.githubusercontent.com/b7d7f1f809065a3b5036471236f67b4679efe59409a65707e57d1a5075c7c8d1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c61726176656c2d25354531332e302d2532334646324432302e7376673f7374796c653d666f722d7468652d6261646765266c6f676f3d6c61726176656c266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/b7d7f1f809065a3b5036471236f67b4679efe59409a65707e57d1a5075c7c8d1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c61726176656c2d25354531332e302d2532334646324432302e7376673f7374796c653d666f722d7468652d6261646765266c6f676f3d6c61726176656c266c6f676f436f6c6f723d7768697465)[![PHP](https://camo.githubusercontent.com/de35f21ad56b5c00939e1f07ef6d8325bc07c6345bbf91380a05840d38ca523b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253545382e332d2532333737374242342e7376673f7374796c653d666f722d7468652d6261646765266c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/de35f21ad56b5c00939e1f07ef6d8325bc07c6345bbf91380a05840d38ca523b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253545382e332d2532333737374242342e7376673f7374796c653d666f722d7468652d6261646765266c6f676f3d706870266c6f676f436f6c6f723d7768697465)

---

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

[](#installation)

You can install the package via composer:

```
composer require m2collective/laravel-metadata-markup
```

The package will automatically register itself.

Commands
--------

[](#commands)

Publishing the configuration file:

```
php artisan m2collective:metadata-markup:publish-config
```

Publishing HTML views:

```
php artisan m2collective:metadata-markup:publish-views
```

Usage
-----

[](#usage)

After installing the package, you can add and edit meta tags on your website.

### Dependency injection

[](#dependency-injection)

An example of using a package with the dependency injection:

```
use M2Collective\MetadataMarkup\MetadataMarkup;

final class Example
{
    /**
     * @var MetadataMarkup
     */
    protected MetadataMarkup $markup;

    /**
     * @param MetadataMarkup $markup
     */
    public function __construct(
        MetadataMarkup $markup
    ) {
        $this->markup = $markup;
    }

    /**
     * @return array
     */
    public function markup(): array
    {
        // Editing service variables.
        $this->markup
            ->viewport('width=device-width, initial-scale=1')
            ->charset('utf-8')
            ->title('Document title')
            ->description('Document description')
            ->keywords('Document keywords')
            ->robots('index, follow')
            ->author('M2Collective')
            ->copyright('M2Collective')
            ->canonical('https://example.com/')
            ->prev(null)
            ->next(null)

        // Passing variables from the service.
        return [
            'viewport' => $markup->viewport->getContent(),
            'charset' => $markup->charset->getContent(),
            'title' => $markup->title->getContent(),
            'description' => $markup->description->getContent(),
            'keywords' => $markup->keywords->getContent(),
            'robots' => $markup->robots->getContent(),
            'author' => $markup->author->getContent(),
            'copyright' => $markup->copyright->getContent(),
            'canonical' => $markup->canonical->getHref(),
            'prev' => $markup->prev->getHref(),
            'next' => $markup->next->getHref(),
        ];
    }
}
```

### Facades

[](#facades)

An example of using a package with the facades:

```
use M2Collective\MetadataMarkup\Facades\MetadataMarkup;

final class Example
{
    /**
     * @return array
     */
    public function markup(): array
    {
        // Editing service variables.
        $markup = MetadataMarkup::viewport('width=device-width, initial-scale=1')
            ->charset('utf-8')
            ->title('Document title')
            ->description('Document description')
            ->keywords('Document keywords')
            ->robots('index, follow')
            ->author('M2Collective')
            ->copyright('M2Collective')
            ->canonical('https://example.com/')
            ->prev(null)
            ->next(null)

        // Passing variables from the service.
        return [
            'viewport' => $markup->viewport->getContent(),
            'charset' => $markup->charset->getContent(),
            'title' => $markup->title->getContent(),
            'description' => $markup->description->getContent(),
            'keywords' => $markup->keywords->getContent(),
            'robots' => $markup->robots->getContent(),
            'author' => $markup->author->getContent(),
            'copyright' => $markup->copyright->getContent(),
            'canonical' => $markup->canonical->getHref(),
            'prev' => $markup->prev->getHref(),
            'next' => $markup->next->getHref(),
        ];
    }
}
```

### Blade

[](#blade)

An example of using a package with the blade:

```
>

```

License
-------

[](#license)

The MIT License (MIT). Please see the [License file](LICENSE.txt) for more information.

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance100

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

1d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2c4c320216d9bfbd9fd778415869653e4c4703c575a7ffff0bc532a42e5ee0cf?d=identicon)[bu0nq](/maintainers/bu0nq)

---

Top Contributors

[![bu0nq](https://avatars.githubusercontent.com/u/67270989?v=4)](https://github.com/bu0nq "bu0nq (206 commits)")

---

Tags

laravelmarkupphplaravelmetadatamarkupm2collective

### Embed Badge

![Health badge](/badges/m2collective-laravel-metadata-markup/health.svg)

```
[![Health](https://phpackages.com/badges/m2collective-laravel-metadata-markup/health.svg)](https://phpackages.com/packages/m2collective-laravel-metadata-markup)
```

###  Alternatives

[unopim/unopim

UnoPim Laravel PIM

10.5k2.4k](/packages/unopim-unopim)[api-platform/laravel

API Platform support for Laravel

58174.6k17](/packages/api-platform-laravel)[ecotone/laravel

Ecotone for Laravel — CQRS, Event Sourcing, Sagas, Durable Workflows, and Outbox on top of Laravel Queue, via PHP attributes.

21318.6k3](/packages/ecotone-laravel)[codewithdennis/larament

Larament is a time-saving starter kit to quickly launch Laravel 13.x projects. It includes FilamentPHP 5.x pre-installed and configured, along with additional tools and features to streamline your development workflow.

3991.8k](/packages/codewithdennis-larament)[duncanmcclean/statamic-cargo

Comprehensive e-commerce addon for Statamic. Build bespoke e-commerce sites without the complexity.

3518.3k](/packages/duncanmcclean-statamic-cargo)

PHPackages © 2026

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