aman5537jains/seo-manager

There is no license information available for the latest version (4.0) of this package.

to manage the seo tags

4.0 2020-09-21 12:51 UTC

This package is not auto-updated.

Last update: 2024-05-14 06:41:50 UTC


README

Installation

1 - Dependency

The first step is using composer to install the package and automatically update your composer.json file, you can do this by running:

composer require aman5537jains/seo-manager

2 - Provider

You need to update your application configuration in order to register the package so it can be loaded by Laravel, just update your config/app.php file adding the following code at the end of your 'providers' section:

config/app.php

// file START ommited
    'providers' => [
        // other providers ommited
        Aman\SeoManager\SeoManagerServiceProvider::class,
    ],
// file END ommited

3 - Configuration

Publish config

In your terminal type

php artisan vendor:publish --provider="Aman\SeoManager\SeoManagerServiceProvider"
php artisam migrate

4 - Add Models, Excpet Paths amd other config in config\seoconfig.php

<?php 

return
    [
    "models"=>[
        "User"=>\App\User::class,
        "Country"=>\App\Model\Country::class 
    ]   ,
    "except_routes"=>[
        "admin",
        "api",
        'filemanager',
        'file-manager',
        'seo-manager',
        "_debugbar",
        "docs"
    ],
    "subdomain"=>[
        "www",
        // "*"=>["route"=>"{prefix_url}.jiunge.com",]
    ] 
                        
];

4 - usage

open http://localhost/project_name/seo-manager

Screenshot 2023-01-18 at 6 47 08 PM

Add New Url

Screenshot 2023-01-18 at 6 47 34 PM

You can configure static as well dyanamic url and can map the model column to params as shown in screenshot

generated seo tags

Screenshot 2023-01-18 at 6 52 40 PM

5 - Configure in view page

just add @seomanagertags in your main layout where all meta tags are written Example: Screenshot 2023-01-18 at 6 55 02 PM

<!doctype html>
<html lang="{{ app()->getLocale() }}">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">

        @seomanagertags
                        
 </head>
 <body>
  Content
 </body>
</html>