PHP code example of noeldemartin / laravel-semantic-seo

1. Go to this page and download the library: Download noeldemartin/laravel-semantic-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/ */

    

noeldemartin / laravel-semantic-seo example snippets


SemanticSEO::website()
    ->url(route('home'))
    ->name('My Website');

SemanticSEO::is(MyType::class)
    ->myAttribute('foobar');

SemanticSEO::meta('title', 'My Website');
SemanticSEO::meta('description', 'My Website is awesome');

SemanticSEO::meta([
    'title' => trans('seo.title'),
    'description' => trans('seo.description'),
]);

Route::view('secret', 'secret')->middleware('semantic-seo:hide');

SemanticSEO::rss(url('blog/rss.xml'), 'My RSS Feed');
SemanticSEO::sitemap(url('sitemap.xml'), 'My Sitemap');

SemanticSEO::canonical(false);

SemanticSEO::twitter('title', 'Twitter title');
SemanticSEO::openGraph('title', 'Open Graph title');