Laravel Meta Manager

Laravel Meta Manager is an SEO tool that is used to improve the SEO of a website or specific page by adding recommended meta tags to your application.

SEO Features

  • Standard Meta Tags

  • Facebook OpenGraph Meta Tags

  • Twitter Card Meta Tags

  • Dublin Core Meta Tags

  • Link Tags

Requirements

  • PHP 5.4 and above

Steps:

Install

Composer

Run the following to include this package via Composer

composer require davmixcool/laravel-meta-manager

Laravel 5.5+ uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.

Once the download is complete, the next thing you have to do is include the service provider within config/app.php.

'providers' => [
        Davmixcool\MetaManager\MetaServiceProvider::class,
];

Then run;php artisan vendor:publish --provider="Davmixcool\MetaManager\MetaServiceProvider" to get the config of Laravel Meta Manager.

Configuration

Setup default application meta inmeta.phpconfig. (Optional but recommended)

Available options:

Usage

Once the configuration is complete you can then add the below at the meta area of the page you want to include meta tags;

@include('meta::manager')

The above will use the predefined configurations to prefill the generated meta tags. However, if you chose to define certain options on the fly then you can use the code below.

@include('meta::manager', [
    'title'         => 'My Example Title',
    'description'   => 'This is my example description',
    'image'         => 'Url to the image',
])

Example

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Document</title>
        @include('meta::manager', [
            'title'         => 'My Example Title',
            'description'   => 'This is my example description',
            'image'         => '',
        ])
    </head>
    <body>

    </body>
    </html>

Stargazers

Forkers

Maintainers

This package is maintained by David Oti and you!

License

This package is licensed under the MIT license.

Last updated