PHPackages                             area17/laravel-auto-head-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. [Templating &amp; Views](/categories/templating)
4. /
5. area17/laravel-auto-head-tags

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

area17/laravel-auto-head-tags
=============================

Laravel Auto Head Tags helps you build the list of head elements for your app

v1.1.7(2y ago)4615.7k↓40.9%2MITPHPPHP ^7.2|^8.0

Since May 10Pushed 2y ago3 watchersCompare

[ Source](https://github.com/area17/laravel-auto-head-tags)[ Packagist](https://packagist.org/packages/area17/laravel-auto-head-tags)[ Docs](https://github.com/area17/laravel-auto-head-tags)[ RSS](/packages/area17-laravel-auto-head-tags/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (11)Used By (0)

Laravel Auto Head Tags
======================

[](#laravel-auto-head-tags)

[![Latest Version on Packagist](https://camo.githubusercontent.com/442adb9f52194be33fab193a1317b660c78449696f078aaf26a8ee0b1e6c2b97/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6172656131372f6c61726176656c2d6175746f2d686561642d746167732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/area17/laravel-auto-head-tags)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/39ecad76b9e3ab120b7746c7f49d68b8a81a0cdaf906b60b5a7da2eb381864ec/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6172656131372f6c61726176656c2d6175746f2d686561642d746167732f6261646765732f6275696c642e706e673f623d6d6173746572267374796c653d666c61742d737175617265)](https://travis-ci.com/github/area17/laravel-auto-head-tags)[![Coverage Status](https://camo.githubusercontent.com/abcaa012ffd2634157a3890c71985665777d35a4ea5304fe28967c786301dd76/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6172656131372f6c61726176656c2d6175746f2d686561642d746167732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/area17/laravel-auto-head-tags/code-structure)[![Quality Score](https://camo.githubusercontent.com/da67d243e571d97fd5d11a18413172df9785fce11071eb98cc333500812e9ecf/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6172656131372f6c61726176656c2d6175746f2d686561642d746167732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/area17/laravel-auto-head-tags)[![Total Downloads](https://camo.githubusercontent.com/f9a152995f882b7acc0abcba22786fcba3719525e9d6332209298c2036ecb2cf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6172656131372f6c61726176656c2d6175746f2d686561642d746167732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/area17/laravel-auto-head-tags)

Description
-----------

[](#description)

This package aims to ease the creating of all HTML head tags: meta, links, SEO, Open Graph, Twitter and whatever else you need.

The package will grab all the info it needs from the data sent to Blade:

```
return view('welcome', [
    'seo' => [
        'title' => 'Your page title',

        'description' => 'The meta description for the page',

        'urls' => [
            'canonical' => 'https://site.com/the-article-slug'
        ],
    ],

    'twitter' => [
        'handle' => '@opticalcortex'
    ],

    'image' => [
        'url' => 'https://site.com/image.jpg'
    ]
]);
```

To generate, out of the box, this set of tags for you:

```
Your page title\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n

```

[The list of tags is larger](https://github.com/area17/laravel-auto-head-tags/blob/master/config/laravel-auto-head-tags.yaml), but if you don't provide enough information to create those tags, they won't be created.

Install
-------

[](#install)

### Via Composer

[](#via-composer)

```
composer require area17/laravel-auto-head-tags
```

### Publish the config file

[](#publish-the-config-file)

```
php artisan vendor:publish --provider="A17\LaravelAutoHeadTags\ServiceProvider"
```

Using
=====

[](#using)

Add to your blade template
--------------------------

[](#add-to-your-blade-template)

Add the tag `@head` to your main template:

```
>

        @head

        ...

    ...

```

This directive is also configurable, just publish the configuration and change the `blade.directive`.

Configuring
-----------

[](#configuring)

All available tags are on the config file: `config/laravel-auto-head-tags.yaml`, and everything is configurable. This is an extract of the tags section:

```
# TAGS
tags:
    # META

    # HEAD
    meta:
    - charset: "{head.charset}|utf-8"
    - name: viewport
      content: "{head.viewport}|width=device-width, initial-scale=1.0, minimum-scale=1"
    - name: author
      content: "{head.author}"
    - http-equiv: "X-UA-Compatible"
      content: "{head.httpEquiv}|IE=Edge"
    - name: mobile-web-app-capable
      content: "{head.mobile-web-app-capable}|yes"
    - name: apple-mobile-web-app-capable
      content: "{head.apple-mobile-web-app-capable}|yes"
    - name: apple-mobile-web-app-title
      content: "{head.apple-mobile-web-app-title}|{og.title}|{$config.app.name}"
```

You can define macros to access Blade data, using `{}`, and the package can resolve them using the "dot" notation for arrays:

```
content: "{head.author}"
```

You can define as many fallbacks you need for those macros:

```
title: "{title}|{head.title}|{seo.title}|{og.title}|{$config.app.name}"
```

And you can also access data from the Laravel config:

```
content: "{$config.app.name}"
```

If it's required to generate more than one URL for a single tag definition, there's `loop` concept:

```
- rel: canonical
  href: "{seo.urls.canonical}"
- rel: alternate
  href: "{seo.urls.hreflang:value}"
  hreflang: "{seo.urls.hreflang:key}"
```

If `seo.urls.hreflang` is an array made of locales (`key`) and URLs (`value`), this configuration will generate these tags:

```

```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CODE\_OF\_CONDUCT](CODE_OF_CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [AREA 17](https://github.com/area17)
- [Antonio Ribeiro](https://github.com/antonioribeiro)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity67

Established project with proven stability

 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 ~149 days

Recently: every ~332 days

Total

10

Last Release

852d ago

PHP version history (2 changes)v1.0.0PHP ~7.2

1.1.5PHP ^7.2|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/d9421a69d192db597169ec3519ad3efc6a35a660e4525e2ed08f6c753b908e86?d=identicon)[AntonioCarlosRibeiro](/maintainers/AntonioCarlosRibeiro)

![](https://avatars.githubusercontent.com/u/13578874?v=4)[twill](/maintainers/twill)[@twill](https://github.com/twill)

---

Top Contributors

[![antonioribeiro](https://avatars.githubusercontent.com/u/3182864?v=4)](https://github.com/antonioribeiro "antonioribeiro (12 commits)")

---

Tags

area17laravel-auto-head-tags

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/area17-laravel-auto-head-tags/health.svg)

```
[![Health](https://phpackages.com/badges/area17-laravel-auto-head-tags/health.svg)](https://phpackages.com/packages/area17-laravel-auto-head-tags)
```

###  Alternatives

[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[whitecube/nova-flexible-content

Flexible Content &amp; Repeater Fields for Laravel Nova.

8053.0M25](/packages/whitecube-nova-flexible-content)[mopa/bootstrap-bundle

Easy integration of twitters bootstrap into symfony2

7042.9M33](/packages/mopa-bootstrap-bundle)[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3871.2M](/packages/limenius-react-bundle)[nicmart/string-template

StringTemplate is a very simple string template engine for php. I've written it to have a thing like sprintf, but with named and nested substutions.

2101.7M30](/packages/nicmart-string-template)[symfony/ux-icons

Renders local and remote SVG icons in your Twig templates.

555.8M69](/packages/symfony-ux-icons)

PHPackages © 2026

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