PHPackages                             code4mk/lara-head - 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. code4mk/lara-head

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

code4mk/lara-head
=================

Easily setup seo meta tag with lara-head

v1.0.0(7y ago)17417.0k↓38.9%12MITPHP

Since Jun 21Pushed 6y ago8 watchersCompare

[ Source](https://github.com/code4mk/lara-head)[ Packagist](https://packagist.org/packages/code4mk/lara-head)[ Docs](https://github.com/code4mk/lara-head)[ RSS](/packages/code4mk-lara-head/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)DependenciesVersions (2)Used By (0)

[![](https://user-images.githubusercontent.com/17185462/56885908-85d97780-6a8f-11e9-81ef-e7e6ac49d1ed.PNG)](https://user-images.githubusercontent.com/17185462/56885908-85d97780-6a8f-11e9-81ef-e7e6ac49d1ed.PNG)

installation
============

[](#installation)

```
composer require code4mk/lara-head
```

usage meta
==========

[](#usage-meta)

~ inside controller

```
use Khead;
class Test
{
  public function home()
  {
    Khead::setMeta('viewport',[
      "name" => "viewport",
      "content"=>"width=device-width, initial-scale=1"
    ]);
  }
}
```

~ inside blade

```
{{ Khead::getMeta('viewport') }}
//
```

link
====

[](#link)

```
Khead::setLink('author',[
  "rel"=>"author",
  "href"=>"humans.txt"
]);
// blade
{{ Khead::getLink('author') }}
//
```

script
======

[](#script)

```
Khead::setScript('one',[
  "src"=>"test.js",
]);
// blade
{{ Khead::getScript('one') }}
//
```

title
=====

[](#title)

```
Khead::setTitle('this is a title');
// blade
{{ Khead::getTitle() }}
```

facebook open graph
===================

[](#facebook-open-graph)

```
Khead::setOg([
  "app_id" => [
    "property"=>"fb:app_id",
    "content"=>"123456789"
  ],
  "url" => [
    "property"=>"og:url",
    "content"=>"https://example.com/page.html"
  ],
  "type" => [
    "property"=>"og:type", "content"=>"website"
  ],
  "title" => [
    "property"=>"og:title",
    "content"=>"Content Title"
  ],
  "image" => [
    "property"=>"og:image",
    "content"=>"https://example.com/image.jpg"
  ],
  "description" => [
    "property"=>"og:description",
    "content"=>"Description Here"
  ],
  "site_name" => [
    "property"=>"og:site_name",
    "content"=>"Site Name"
  ],
  "locale" => [
    "property"=>"og:locale",
    "content"=>"en_US"
  ],
  "author" => [
    "property"=>"article:author",
    "content"=>"@code4mk"
  ]
]);
// blade
{{ Khead::getOg() }}
```

twitter cards
=============

[](#twitter-cards)

```
Khead::setTwitCards([
  "card" => [
    "name" => "twitter:card",
    "content"=>"summary"
  ],
  "site" => [
    "name"=>"twitter:site",
    "content"=>"@code4mk"
  ],
  "creator" => [
    "name"=>"twitter:creator",
    "content"=>"@code4mk"
  ],
  "url" => [
    "name"=>"twitter:url",
    "content"=>"https://code4mk.org"
  ],
  "title" => [
    "name"=>"twitter:title",
    "content"=>"Content Title"
  ],
  "description" => [
    "name"=>"twitter:description",
    "content"=>"Content description less than 200 characters"
  ],
  "image" => [
    "name"=>"twitter:image",
    "content"=>"https://code4mk.org/image.jpg"
  ],
  "dnt" => [
    "name"=>"twitter:dnt",
    "content"=>"on"
  ]
]);
// blade
{{ Khead::getTwitCards() }}
```

Head tags
=========

[](#head-tags)

- [gist link](https://gist.github.com/lancejpollard/1978404)
- [gethead](https://gethead.info/)

[](https://twitter.com/0devco)

[![](https://raw.githubusercontent.com/0devco/docs/master/.devco-images/logo-transparent.png)](https://raw.githubusercontent.com/0devco/docs/master/.devco-images/logo-transparent.png)

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity43

Moderate usage in the ecosystem

Community10

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

2569d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5e3bffe09346f036f5a42f64d3b771b9bf41a44ffd712caecac932f69f990ed7?d=identicon)[code4mk](/maintainers/code4mk)

---

Tags

0devcocode4mkheadlaravellaravel-metalaravel-seophpseoseometameta tagheadcode4mk0devcokhead

### Embed Badge

![Health badge](/badges/code4mk-lara-head/health.svg)

```
[![Health](https://phpackages.com/badges/code4mk-lara-head/health.svg)](https://phpackages.com/packages/code4mk-lara-head)
```

###  Alternatives

[ycs77/inertia-laravel-ssr-head

Simple SSR Head for Inertia Laravel

3414.1k](/packages/ycs77-inertia-laravel-ssr-head)[pedroborges/meta-tags

HTML meta tags generator for PHP.

4628.9k1](/packages/pedroborges-meta-tags)[dereuromark/cakephp-meta

A CakePHP plugin for SEO meta tags, OpenGraph and Twitter Cards

1014.7k1](/packages/dereuromark-cakephp-meta)[f9webltd/laravel-meta

Render meta tags in your Laravel application

4051.8k](/packages/f9webltd-laravel-meta)[ryannielson/meta

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

3023.2k1](/packages/ryannielson-meta)

PHPackages © 2026

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