PHP code example of itmosoft / laravel-seo

1. Go to this page and download the library: Download itmosoft/laravel-seo library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

itmosoft / laravel-seo example snippets


use ItmoSoft\Seo\SeoManager;

$seo = app(SeoManager::class);

$seo->title('Product name')
    ->description('A concise product description.')
    ->canonical(url()->current())
    ->image(asset('images/product.png'))
    ->type('product');

app(SeoManager::class)->structuredData([
    '@context' => 'https://schema.org',
    '@type' => 'Product',
    'name' => $product->name,
    'description' => $product->description,
]);
blade
{!! app(\ItmoSoft\Seo\SeoManager::class)->render() !!}