PHP code example of pyncil / seo

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

    

pyncil / seo example snippets

 php
'providers' => [
    Pyncil\SEO\Providers\SEOServiceProvider::class
]
 php
public function showArticle(Request $request, $id)
{
    $article = Article::find($id);
    
    SEO::setTitle($article->title)
        ->setDescription($article->description)
        ->setCanonical()
        ->setNext(url('article/' . ($id + 1)))
        ->setPrev(url('article/' . ($id - 1)))
        ->setRobots();
    
    return view('article.show')->with('article', $article);
}
 php
SEO::favicons()->set('folder/containing/icons');
 php
$colors = [
    'safari_pinned' => '#000000',
    'ms_tile' => '#000000',
    'theme' => '#000000'
];