ozankurt/modules-blog
Composer 安装命令:
composer require ozankurt/modules-blog
包简介
Headless blog module for Laravel with scheduled publishing, SEO, translations, and Filament admin.
README 文档
README
Headless blog module for Laravel: posts, categories, tags, comments, scheduled publishing, SEO meta, translatable content, Spatie medialibrary.
Requirements
- PHP 8.4+
- Laravel 12.x or 13.x
ozankurt/laravel-modules-corev2.x
Installation
composer require ozankurt/laravel-modules-blog
Publish config and migrations:
php artisan vendor:publish --tag=blog-config php artisan vendor:publish --tag=blog-migrations php artisan migrate
What it provides
Kurt\Modules\Blog\Models\Post— with translatable title/excerpt/body/meta_*, status enum (Draft/Scheduled/Published/Archived), type enum (Text/Image/Video/Carousel), scopes (published,scheduled,drafts,popular,inCategory,withTags,authoredBy).Category,Tag,Commentmodels with their relations and scopes.BlogAuthorcontract +IsBlogAuthortrait for your User model.Kurt\Modules\Blog\Support\VideoUrl::parse()for YouTube / Vimeo / DailyMotion URL parsing.Kurt\Modules\Blog\Support\SeoMetadata::forPost()for SEO meta resolution.- Console commands:
blog:publish-due,blog:upgrade-translations,blog:demo. - Domain events:
PostCreated,PostUpdated,PostPublished,PostArchived,CommentCreated,CommentApproved,CommentRejected, ...
Filament admin
The package ships parallel admin resource sets for Filament v3, v4, and v5 —
PostResource, CategoryResource, TagResource, and CommentResource. The
correct set is chosen at runtime from the installed Filament major, so you
register a single version-dispatching plugin on your panel:
use Filament\Panel; use Kurt\Modules\Blog\Filament\BlogPlugin; public function panel(Panel $panel): Panel { return $panel // ... ->plugin(BlogPlugin::make()); }
BlogPlugin::make() resolves to the matching V3/V4/V5 plugin via
Kurt\Modules\Core\Support\FilamentVersion. Install whichever Filament major
your app uses — the resources require nothing beyond what the module already
depends on:
# whichever your app runs composer require filament/filament:"^3.0|^4.0|^5.0" composer require filament/spatie-laravel-media-library-plugin:"^3.0|^4.0|^5.0"
What the resources give you:
- Posts — per-locale (en/tr) translatable title/excerpt/body and SEO meta;
status and type enum selects; a
scheduled_forpicker shown when the status is Scheduled and avideo_urlfield shown when the type is Video; category and tag relationship selects; a Spatie media-library cover upload; a table with status/type filters, badges, author, category, publish date and view count. - Categories — translatable name/description, parent (tree) select, slug read-only on edit, post counts.
- Tags — translatable name/description with a colour picker and a colour swatch column.
- Comments — a moderation queue defaulting to pending, with approve/reject row actions and approve/reject/delete bulk actions.
License
MIT (c) Ozan Kurt
统计信息
- 总下载量: 84
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 9
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-06-11