SEO tool for Laravel Application

Brijpal Sharma
laravel   Publish on:-March 17th, 2019 , Category:- Web Development

Today topic is SEO tool for Laravel Application. we integrate artesaos/seotools package for Laravel application.

SEO tool for Laravel Application

On the internet to get on the first page of Google SEO is the most important factor so to many method and way to stay on the first page of Google.

Today we Discus an SEO artesaos/seotools plugin for Laravel by using this plugin we can easily manage all pages title, description, keyword and many more. so let's start.

Step:1 Create a  new Laravel Application.

laravel new seotools

After successful install Laravel Application, we move to the next step.


Step: 2 Install Package.

composer require artesaos/seotools


Step:3 update configuration of Application.

Now you need to update your application configuration, just update your config/app.php file adding the following code at the end of your providers' section.


In order to use the SEO Meta facade, you need to add it on the config/app.php file, you can do that the following way.

 'SEOMeta'   => Artesaos\SEOTools\Facades\SEOMeta::class,
 'OpenGraph' => Artesaos\SEOTools\Facades\OpenGraph::class,
 'Twitter'   => Artesaos\SEOTools\Facades\TwitterCard::class,
        // or
 'SEO'       => Artesaos\SEOTools\Facades\SEOTools::class,


Step:4 Publish config

php artisan vendor:publish --provider="Artesaos\SEOTools\Providers\SEOToolsServiceProvider"


Now everything is done now time to test our Laravel application with SEO tools.

Step:1 Create a route

Route::get('article','[email protected]')->name('article');


Step: 2 Create a controller

php artisan make:controller ArticleController

add some code into ArticleController.php


namespace App\Http\Controllers;

use Illuminate\Http\Request;
use SEOMeta;
use OpenGraph;
use Twitter;
## or
use SEO;
class ArticleController extends Controller
    public function article()
        $title = "This is a blog title";
        $description ="This is a discription of my blog post";
        $body        = "This is main body of my blog post";

        SEO::setDescription('This is my page description');
        return view('article',compact('title','description','body'));

Step:3 Create a new view article.blade.php

And some HTML code to view title, description, and body which is passed from the controller with SEO meta details. 

<!DOCTYPE html>
	{!! SEO::generate() !!}

	<h1>{{$title}} </h1> <br>
	<h2>{{$description}} </h2> <br>
	<p>{{$body}} </p>

Now we can see the result on the view page and see the SEO meta tag on the view source page.

SEO tool for Laravel Application


SEO tool for Laravel Application

To get more detail about this package you can visit on // 

So here we completed the tutorial on SEO tool for Laravel Application.

Real our another article on Laravel Paypal payment gateway integration in Laravel 5.7 step by step

Brijpal Sharma

Hello, My Name is Brijpal Sharma. I am a Web Developer, Professional Blogger and Digital Marketer from India. I am the founder of Codermen. I started this blog to help web developers & bloggers by providing easy and best tutorials, articles and offers for web developers and bloggers...


Generic placeholder image

Tuhin Bepari
Publish on:-September 14th, 2019
Thanks for the great article. This tools is for Programmer. So client or Web master does not have control about Meta title and description like WordPress Yoast has. To solve this problem // This is a great tools. We can say its Laravel's Yoast.

You must be logged in to post a comment.