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

Overview

installation

composer require code4mk/lara-head

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') }}
// <meta name="bladeport" content="width=device-width, initial-scale=1">

link

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

script

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

title

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

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

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

You might also like...
A convenient helper for using the laravel-seo package with Filament Admin and Forms
A convenient helper for using the laravel-seo package with Filament Admin and Forms

Combine the power of Laravel SEO and Filament PHP. This package is a convenient helper for using the laravel-seo package with Filament Admin and Forms

This is an open source demo of administration panel for polymorphic relationship and SEO content

Laravel SEO admin This application demonstrates usage of polymorphic relationships described at (http://maxoffsky.com/code-blog/using-polymorphic-rela

Easily add a full Laravel blog (with built in admin panel and public views) to your laravel project with this simple package.

Webdevetc BlogEtc - Complete Laravel Blog Package Quickly add a blog with admin panel to your existing Laravel project. It has everything included (ro

A premade, easy to use local development setup to be used for authoring Laravel applications

Laravel Drydock This project is a premade, easy to use local development setup to be used for authoring Laravel applications. The deliverables of this

Package for Laravel that gives artisan commands to setup and edit environment files.
Package for Laravel that gives artisan commands to setup and edit environment files.

Setup and work with .env files in Laravel from the command line NOTE: This doesn't work with Laravel 5 since .env files were changed. This is for Lara

Easily Integrate PingPing APIs in your Laravel Project

PingPing This composer package allows us to easily integrate PingPing APIs in your Laravel project. What is PingPing ? PingPing is the simplest uptime

Easily add all the 58 Algerian Wilayas and its Dairas to your cool Laravel project (Migrations, Seeders and Models).
Easily add all the 58 Algerian Wilayas and its Dairas to your cool Laravel project (Migrations, Seeders and Models).

Laravel-Algereography Laravel-Algereography allows you to add Migrations, Seeders and Models of Algerian Wilayas and Dairas to your existing or new co

Laravel 2-Step Verification is a package to add 2-Step user authentication to any Laravel project easily.
Laravel 2-Step Verification is a package to add 2-Step user authentication to any Laravel project easily.

Laravel 2-Step verification is a package to add 2-Step user authentication to any Laravel project easily. It is configurable and customizable. It uses notifications to send the user an email with a 4-digit verification code. Laravel 2-Step Authentication Verification for Laravel. Can be used in out the box with Laravel's authentication scaffolding or integrated into other projects.

A Laravel Wrapper for the CoinDCX API. Now easily connect and consume the CoinDCX Public API in your Laravel apps without any hassle.
A Laravel Wrapper for the CoinDCX API. Now easily connect and consume the CoinDCX Public API in your Laravel apps without any hassle.

This package provides a Laravel Wrapper for the CoinDCX API and allows you to easily communicate with it. Important Note This package is in early deve

Releases(v1.0.0)
Owner
Let's code with fun 💗 @mostafa6765 💗 @kawsarsoft
null
Laravel Seo package for Content writer/admin/web master who do not know programming but want to edit/update SEO tags from dashboard

Laravel Seo Tools Laravel is becoming more and more popular and lots of web application are developing. In most of the web application there need some

Tuhin Bepari 130 Dec 23, 2022
SEO Helper is a package that provides tools and helpers for SEO (Search Engine Optimization).

SEO Helper By ARCANEDEV© SEO Helper is a package that provides tools and helpers for SEO (Search Engine Optimization). Feel free to check out the rele

ARCANEDEV 301 Nov 25, 2022
Load head metadata from a manifest file which can be shared with a SPA project

Laravel Head Manifest Installation Step 1: Add Laravel Head Manifest to your laravel project composer require critiq/laravel-head-manifest Step 2: Add

Critiq 1 Nov 17, 2021
Simple SSR Head for Inertia.js Laravel

Inertia.js Laravel SSR Head Simple SSR Head for Inertia Laravel, solve the social media metadata display of small Inertia.js x Laravel site. NOT a ful

Lucas Yang 12 Nov 14, 2022
Simple laravel hook for adding meta tags to head for inertia

laravel seo hook for js frameworks simple hook for adding meta tags to <head></head> for js frameworks inertia:react,vue, etc... in app/Meta.php put M

Razmik Ayvazyan 2 Aug 23, 2022
Laravel package for manage your URL redirects in database or other sources to get better SEO results

Laravel 8 and 9 package to manage URL redirections inside your Laravel application using different data sources. It allows a better SEO support for your Laravel site.

Siro Díaz Palazón 51 Sep 21, 2022
SEO Tools for Laravel

SEOTools - SEO Tools for Laravel and Lumen SEOTools is a package for Laravel 5.8+ and Lumen that provides helpers for some common SEO techniques. Curr

Artesãos 2.7k Dec 31, 2022
This repo is for the Laracon 2021 talk "Manage SEO with Laravel and Nova"

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Kristin 7 Dec 9, 2022
Seo Manager Package for Laravel ( with Localization )

Seo Manager Package for Laravel ( with Localization ) lionix/seo-manager package will provide you an interface from where you can manage all your page

Lionix 205 Dec 23, 2022
A package to handle the SEO in any Laravel application, big or small.

Never worry about SEO in Laravel again! Currently there aren't that many SEO-packages for Laravel and the available ones are quite complex to set up a

Ralph J. Smit 267 Jan 2, 2023