littleboy130491/seo-suite
Composer 安装命令:
composer require littleboy130491/seo-suite
包简介
SEO Suite for FilamentPHP: Easily integrate and manage SEO features in your Filament projects
README 文档
README
This project is a fork of https://packagist.org/packages/afatmustafa/seo-suite. It inherits the core functionalities from the original repository, with additional customizations and improvements.
Elevate your Filament project with SEO Suite, leveraging the artesaos/seotools package for enhanced search engine optimization.
This package allows you to seamlessly integrate and manage SEO features, making your project more search engine friendly.
Features
- Ready-to-use form component: Easily add SEO settings to your resources.
- Set title and meta tags: Quickly configure title and meta tags.
- Social media integration: Support for Twitter Cards and Open Graph.
- Multiple open graph types: Supports 3 open graph types: article, book, profile.
- Multiple twitter card types: Supports 4 twitter card types: summary, summary_large_image, app, player.
- Fallback ready: Ensures robust default values.
- Ready-to-translate: Supports multiple languages.
Installation
composer require littleboy130491/seo-suite
Note: This package uses artesaos/seotools behind the scenes, you may also need to follow the installation steps there.
You can publish and run the migrations with:
php artisan vendor:publish --tag="seo-suite-migrations"
php artisan migrate
You can publish the config file with (optional):
php artisan vendor:publish --tag="seo-suite-config"
This is the contents of the published config file:
return [ /** * Override the SEO Model to perform custom actions. */ 'model' => \Littleboy130491\SeoSuite\Models\SeoSuite::class, 'table_name' => 'seo_suite', /* |-------------------------------------------------------------------------- | Enabled features. | If you want to disable a feature, set it to false. |-------------------------------------------------------------------------- */ 'features' => [ 'general' => [ 'enabled' => true, 'fields' => [ 'title' => true, 'description' => true, ], ], 'advanced' => [ 'enabled' => true, 'fields' => [ 'canonical' => true, 'noindex' => true, 'nofollow' => true, 'metas' => true, ], ], 'opengraph' => [ 'enabled' => true, 'fields' => [ 'og_title' => true, 'og_description' => true, 'og_type' => true, 'og_properties' => true, ], ], 'x' => [ 'enabled' => true, 'fields' => [ 'x_card_type' => true, 'x_title' => true, 'x_site' => true, ], ], ], // SEO fallbacks 'fallbacks' => [ 'title' => 'title', 'description' => 'description', 'og_type' => 'article', ], ];
Optionally, you can publish the translations using
php artisan vendor:publish --tag="seo-suite-translations"
The package currently supports both English and Turkish languages. If you want to add a new language, feel free to create a PR.
Usage
In Your Model
First, you need to add the Littleboy130491\SeoSuite\Models\Traits\InteractsWithSeoSuite trait to your model.
If you want to edit your SEO Fallbacks on a model basis, you can edit them by adding a property called $seoFallbacks to your model.
// App/Models/Page.php class Page extends Model { use Littleboy130491\SeoSuite\Models\Traits\InteractsWithSeoSuite; protected ?array $seoFallbacks = [ 'title' => 'name', 'description' => 'excerpt' ]; }
In Your Resource
To use the form component, you can add \Littleboy130491\SeoSuite\SeoSuite::make() function into your resource.
// App\Filament\Resources\PageResource.php class PageResource extends Resource { ... public static function form(Form $form): Form { return $form ->schema([ ... Forms\Components\Section::make('SEO Settings') ->schema([ \Littleboy130491\SeoSuite\SeoSuite::make() ]) ... ]); } ... }
In Your Frontend Controller
In your controller you can add the trait Littleboy130491\SeoSuite\Traits\SetsSeoSuite and then use the setsSeo() function to set the meta tags.
// App\Http\Controllers\Site\PageController.php class PageController extends Controller { use \Littleboy130491\SeoSuite\Traits\SetsSeoSuite; public function home() { $page = \App\Models\Page::whereTemplate('homepage')->first(); $this->setsSeo($page); return view('site.pages.home'); } }
In Your View
You can use the SEO::generate() to render the SEO tags in your view.
<html> <head> {!! SEO::generate() !!} </head> <body> </body> </html>
Result 🤩
Frontend Result
Finally, this is how your meta tags will look like in the frontend.
<title>Taking Notes on Taking Notes - Afat.me</title> <meta name="description" content="I’ll share my personal journey through various note-taking applications, from Notion to Obsidian, highlighting the pros, cons, and humorous moments along the way."> <meta name="google-site-verification" content="lxqpno64dlwihrdkvbgwtzzha0poig"> <link rel="canonical" href="https://afat.me"> <meta property="og:title" content="My Note-Taking Apps and Experiences"> <meta property="og:description" content="Taking notes and being organized is crucial for boosting your productivity as a developer. There are many tools available for taking notes, such as Notion, Craft, and Obsidian. These tools can help you organize your ideas, projects, and daily tasks."> <meta property="og:type" content="article"> <meta property="article:tag" content="development"> <meta property="article:author:gender" content="male"> <meta property="article:author:username" content="afatmustafa"> <meta property="article:author:last_name" content="Afat"> <meta property="article:author:first_name" content="Mustafa"> <meta property="article:modified_time" content="2024-08-01 00:00:00"> <meta property="article:published_time" content="2024-08-01 00:00:00"> <meta name="twitter:title" content="My Note-Taking Apps and Experiences"> <meta name="twitter:description" content="I’ll share my personal journey through various note-taking applications, from Notion to Obsidian, highlighting the pros, cons, and humorous moments along the way."> <meta name="twitter:site" content="https://afat.me"> <meta name="twitter:card" content="summary"> <script type="application/ld+json">{"@context":"https://schema.org","@type":"WebPage","name":"Taking Notes on Taking Notes","description":"I’ll share my personal journey through various note-taking applications, from Notion to Obsidian, highlighting the pros, cons, and humorous moments along the way."}</script>
Panel Result
Supported Open Graph Types
Default Values
You can set default values for your SEO tags in the artesaos/seotools config file.
// config/seotools.php
Roadmap
- JSON-LD support
- Multi-language support with spatie/laravel-translatable
- OG Image support with spatie/laravel-medialibrary
- Admin page for managing default SEO values like prefix, suffix, etc.
- Cache support
- More Open Graph types
- Music / Song
- Music / Album
- Music / Playlist
- Music / Radio Station
- Video / Movie
- Video / Episode
- Video / TV Show
- Video / Other
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.
littleboy130491/seo-suite 适用场景与选型建议
littleboy130491/seo-suite 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.43k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 06 月 13 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「seo」 「laravel」 「seotools」 「filament」 「filamentphp」 「seo-suite」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 littleboy130491/seo-suite 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 littleboy130491/seo-suite 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 littleboy130491/seo-suite 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
SEO Tools for Laravel and Lumen
Help to manage meta data on Laravel Eloquent model
SEO Tools for Laravel and Lumen
Statamic Fine Seo addon
SEO Tools for Laravel and Lumen
SEO Tools for Laravel and Lumen
统计信息
- 总下载量: 2.43k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 15
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-06-13