features/opengraph/8 #12
@ -4,6 +4,7 @@ namespace App\Http\Controllers;
|
||||
|
||||
use App\Home;
|
||||
use Artesaos\SEOTools\Traits\SEOTools as SEOToolsTrait;
|
||||
use DateTime;
|
||||
|
||||
class PublicController extends Controller
|
||||
{
|
||||
@ -18,6 +19,10 @@ class PublicController extends Controller
|
||||
->addImages(array_map(static function($picture) {
|
||||
return asset($picture);
|
||||
}, $home->pictures));
|
||||
$this->seo()
|
||||
->opengraph()
|
||||
->addProperty('article:published_time', $home->created_at->format(DateTime::ATOM))
|
||||
->addProperty('article:author', 'Shikiryu');
|
||||
|
||||
return view('public.view', ['home' => $home]);
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ return [
|
||||
'description' => false,
|
||||
'url' => false, // Set null for using Url::current(), set false to total remove
|
||||
'type' => 'article',
|
||||
'site_name' => false,
|
||||
'site_name' => 'Le projet Bretagne',
|
||||
'images' => [],
|
||||
],
|
||||
],
|
||||
|
Loading…
Reference in New Issue
Block a user