1. Go to this page and download the library: Download kreetancraft/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/ */
kreetancraft / laravel-seo example snippets
use Kreetancraft\Seo\Concerns\HasSeo;
class Article extends Model
{
use HasSeo;
public function seoDefaults(): array
{
return [
'title' => $this->title,
'description' => $this->excerpt,
'path' => '/articles/'.$this->slug,
'image' => null,
];
}
}