-
-
Notifications
You must be signed in to change notification settings - Fork 10
Blog Post Example
iRaziul edited this page Mar 22, 2026
·
1 revision
use Larament\SeoKit\Facades\SeoKit;
public function show(Post $post)
{
SeoKit::title($post->title)
->description($post->excerpt)
->image($post->featured_image)
->canonical(route('posts.show', $post));
SeoKit::opengraph()->article(
publishedTime: $post->published_at?->toIso8601String(),
modifiedTime: $post->updated_at?->toIso8601String(),
authors: [$post->author->profile_url],
section: $post->category->name,
tags: $post->tags->pluck('name')->all()
);
SeoKit::twitter()->card('summary_large_image');
SeoKit::jsonld()->article([
'headline' => $post->title,
'description' => $post->excerpt,
'image' => $post->featured_image,
]);
return view('posts.show', compact('post'));
}⭐ Star SeoKit on GitHub if you find it useful. It helps more Laravel developers discover the package.
If you are looking for help with Laravel, package integration, or custom web solutions, feel free to reach out: raziul.dev