1. Go to this page and download the library: Download am2studio/laravel-seo-meta 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/ */
public function __construct()
{
parent::__construct();
SeoMetaHelper::setSeoMeta(['title' => 'Default title __construct .']);
}
public function index()
{
SeoMetaHelper::setSeoMeta(['description' => 'Default description index .']);
return $this->view('index');
}
public function show($product)
{
SeoMetaHelper::setSeoMeta($product->getSeoMeta());
return $this->view('show', compact('product'));
}
{{
\AM2Studio\Laravel\SeoMeta\SeoMetaHelper::render([
//alternative data if is not set anywhere
'keywords' => 'example.com -> frontend layout'
])
}}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.