SEO tool for Laravel Application

Today topic is SEO tool for Laravel Application. we integrate artesaos/seotools package 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.


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

Leave a Comment