问题标签 [revisionable]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
860 浏览

php - 更新模型时,Laravel VentureCraft 可修改无法在 Laravel 5.5 上运行

我使用了这个名为revisionable的包,所以我尝试将它添加到我的package.json并运行迁移,一切正常。

但是当我尝试创建记录然后更新它们时,它不会填写修订表吗?

我正在使用"venturecraft/revisionable": "^1.28",Laravel 5.5

这是我模型中的代码

所以这就是我在我的模型中所做的

我什么时候做错了?

有人可以为我解释一下。提前致谢。

0 投票
2 回答
1038 浏览

laravel - Laravel 可修订获取特定用户的所有修订列表

我正在使用VentureCraft/revisionable -package,它在自述文件中向我展示了如何显示具有修订的模型的修订:

但我想要一个由特定用户完成的所有修订的列表;如何做到这一点?所以我可以显示一个特定用户完成的修订历史。

0 投票
1 回答
109 浏览

laravel - 有没有办法在 laravel 背包-crud 中获得特定版本的模型?

我正在为 laravel-backpack-curd 使用 VentureCraft/revisionable,我知道它可以帮助我管理模型的更改历史,但我想切换到模型的特定版本并将其完全作为模型。有什么办法吗?

让我用一个例子来解释一下:假设我们有一个名为 TODO 的模型,我想获取它的不同版本。想象一下,我想获取这样的东西:

0 投票
0 回答
105 浏览

laravel - Explicitly providing "user_id" to Revisionable

My company uses a 3 tiered system for our web application:

  1. Front end - client layer
  2. Middle layer (composes requests, provides validation and authentication) - accessible by the front end
  3. Backend (where all the database requests are made) - not accessible by the front end

In addition we have a SOA architecture which separates parts of our application. For example, the accounts API is completely separate from the Ads API (which is my primary focus). This means that I don't have a User model available to me in the backend API.

Is it possible to explicitly provide a "user_id" to Revisionable instead of relying on some sort of foreign key or implicitly retrieved user id?

The idea would be that a request to retrieve history for an edited record would simply return the provided user_id. We would then merge that with a request against our Accounts API to determine who the actual user was.

We're using Lumen 8.x for middle and back end layers.