SEO setup in Larafast
resources/views/seo/metatags.blade.php
file.
In resources/views/app.blade.php
file you can find @include('seo.metatags', ['seo' => $page['props']['seo'] ?? null])
which includes the metatags file into the layout file.
If you want to add SEO metatags to a specific page, you should add seo
key to the page’s data array and pass the metatags array to it.
Example on BlogController.php
:
resources/views/app.blade.php
file.<head>
component in resources/views/app.blade.php
file: @include('seo.metatags', ['seo' => $page['props']['seo'] ?? null])
<Head title="..."> ...
from resources/js/Layouts/HomeLayout.vue
file.<Seo title="..." description="..."> ...
from resources/js/Pages/Article.vue
and resources/js/Pages/Blog.vue
file and from everywhere you have added.<Head>
component, which adds meta tags to the <head>
.