Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
L

lara-head

> 后端框架
Open source

Easily setup SEO in your laravel project with lara-head :heart: @code4mk

175 stars0 likes0 views
WebsiteGitHub

About

Easily setup SEO in your laravel project with lara-head :heart: @code4mk

installation

bash
composer require code4mk/lara-head

usage meta

~ inside controller

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

~ inside blade

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

link

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

script

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

title

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

facebook open graph

…

twitter cards

…

Head tags

  • gist link
  • gethead

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

PHP0devcocode4mkheadlaravel

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category后端框架
PricingOpen source

> Related tools

N
Node.js
基于 V8 的 JavaScript 运行时
D
Django
Python 高级 Web 框架
S
Spring Boot
Java 生态主流微服务框架