karabinse/translatable-revisions
最新稳定版本:2.0.1
Composer 安装命令:
composer require karabinse/translatable-revisions
包简介
Translatable revisions for Laravel
README 文档
README
Translatable revisions for Laravel
$ composer require karabin/translatable-revisions
Upgrading
After upgrading, publish and run the package migrations:
php artisan vendor:publish --provider="Karabin\\TranslatableRevisions\\TranslatableRevisionsServiceProvider" --tag=migrations
php artisan migrate
New upgrade migrations include:
- lookup indexes for revision meta and template fields
- unique constraint for i18n definitions by
(term_id, locale) - structured lookup columns and index on i18n terms
- optional snapshot table for read-model acceleration
Snapshot Read Model
The package now supports an optional snapshot read model to speed up repeated field reads.
Enable it in config:
'use_snapshot_read_model' => true,
When enabled:
getSimpleFieldContent()andgetFieldContent()read from snapshots when available- snapshots are rebuilt on first miss
- snapshots are invalidated on updates, purges, publish, and deletes
Backfilling Snapshots
To warm snapshots for existing content, run:
php artisan translatable-revisions:snapshot-backfill --model="App\\Models\\Page"
You can pass --model multiple times for several models.
The command resolves revisions/locales from existing terms/meta rows and warms snapshots through each model's getSimpleFieldContent() method so model-specific getters remain respected.
统计信息
- 总下载量: 133
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-03-17