承接 karabinse/translatable-revisions 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

karabinse/translatable-revisions

最新稳定版本:2.0.1

Composer 安装命令:

composer require karabinse/translatable-revisions

包简介

Translatable revisions for Laravel

README 文档

README

tests

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() and getFieldContent() 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
  • 点击次数: 7
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-17