定制 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
  • 点击次数: 0
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固