-
-
Notifications
You must be signed in to change notification settings - Fork 10
Configuration
iRaziul edited this page Mar 22, 2026
·
1 revision
Publish the config file if you have not already:
php artisan vendor:publish --tag="seokit-config"Most projects only need to review a few options in config/seokit.php.
'defaults' => [
'title' => config('app.name'),
'description' => 'Default site description.',
],Use these as sensible fallbacks.
'canonical' => null,Supported behaviors:
-
nulluses the current URL -
'full'uses the full URL including query string -
falsedisables the default canonical tag
'opengraph' => [
'enabled' => true,
'defaults' => [
'site_name' => config('app.name'),
'type' => 'website',
'url' => null,
'locale' => 'en_US',
],
],
'twitter' => [
'enabled' => true,
'defaults' => [
'card' => 'summary_large_image',
'site' => '@yourbrand',
'creator' => '@yourbrand',
],
],These defaults provide useful social metadata without per-page setup.
'table_name' => 'seokit',Change this only if you want a custom table for the HasSeo workflow.
If enabled, SeoKit can infer a title from the last URL segment when you do not set one manually:
'auto_title_from_url' => true,Example:
-
/blog/laravel-seo-guidebecomesLaravel Seo Guide
You can also provide a custom title_inference_callback.
return [
'table_name' => 'seokit',
'auto_title_from_url' => true,
'defaults' => [
'title' => config('app.name'),
'before_title' => null,
'after_title' => null,
'title_separator' => ' | ',
'description' => 'Default site description.',
'canonical' => null,
'robots' => 'index, follow',
],
'opengraph' => [
'enabled' => true,
'defaults' => [
'site_name' => config('app.name'),
'type' => 'website',
'url' => null,
'locale' => 'en_US',
],
],
'twitter' => [
'enabled' => true,
'defaults' => [
'card' => 'summary_large_image',
'site' => '@yourbrand',
'creator' => '@yourbrand',
],
],
'json_ld' => [
'enabled' => true,
'defaults' => [],
],
];⭐ 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