backpack/revise-operation
Composer 安装命令:
composer require backpack/revise-operation
包简介
Backpack interface for venturecraft/revisionable
关键字:
README 文档
README
Adds an interface for venturecraft/revisionable to your Backpack CRUDs, so that the admin can:
- see the changes that have been made to an entry;
- undo changes;
venturecraft/revisionable allows you to store, see and undo changes to entries on an Eloquent model. This package just provides an admin interface for it, in the form of a Backpack operation, that you can use on the CrudControllers of entities that have the Revisionable trait.
When used, this operation will show another button for each entry in the table view. On click, that button opens another page, which will allow an admin to see all changes and who made them:
Installation
Step 1. Require the package:
composer require backpack/revise-operation
This will automatically install venturecraft/revisionable too, if it's not already installed.
Step 2. Create the Revisions table:
cp vendor/venturecraft/revisionable/src/migrations/2013_04_09_062329_create_revisions_table.php database/migrations/ && php artisan migrate
Step 3. Use RevisionableTrait on your model, and an identifiableName() method that returns an attribute on the model that the admin can use to distiguish between entries (ex: name, title, etc). If you are using another bootable trait be sure to override the boot method in your model.
namespace MyApp\Models; class Article extends Eloquent { use \Backpack\CRUD\CrudTrait, \Venturecraft\Revisionable\RevisionableTrait; public function identifiableName() { return $this->name; } // If you are using another bootable trait // be sure to override the boot method in your model public static function boot() { parent::boot(); } }
Step 4. In your CrudController, use the operation trait:
<?php namespace App\Http\Controllers\Admin; use Backpack\CRUD\app\Http\Controllers\CrudController; class CategoryCrudController extends CrudController { use \Backpack\ReviseOperation\ReviseOperation;
For complex usage, head on over to VentureCraft/revisionable to see the full documentation and extra configuration options.
Customizing views
If you need to change the operation views in any way, you can do so by creating a blade file with the same name in your resources/views/vendor/backpack/revise-operation directory. Blade files there take priority over files in the package.
Change log
Please see the changelog for more information on what has changed recently.
Contributing
Please see contributing.md for details and a todolist.
Security
If you discover any security related issues, please email tabacitu@backpackforlaravel.com instead of using the issue tracker.
Credits
License
MIT. Please see the license file for more information.
backpack/revise-operation 适用场景与选型建议
backpack/revise-operation 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 302.9k 次下载、GitHub Stars 达 43, 最近一次更新时间为 2020 年 03 月 21 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「admin panel」 「Audit Log」 「Admin Interface」 「revisionable」 「Revisions」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 backpack/revise-operation 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 backpack/revise-operation 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 backpack/revise-operation 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
2lenet/EasyAdminPlusBundle
Analysis module for finding problematical shop data.
Yii2 panel widget
A Laravel Admin Package for The Control Group to make your life easier and steer your project in the right direction
ServerPilot: the best way to run PHP websites.
Alfabank REST API integration
统计信息
- 总下载量: 302.9k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 43
- 点击次数: 33
- 依赖项目数: 2
- 推荐数: 17
其他信息
- 授权协议: MIT
- 更新时间: 2020-03-21