{"id":18928925,"url":"https://github.com/laravel-backpack/revise-operation","last_synced_at":"2025-04-04T15:07:20.032Z","repository":{"id":40549011,"uuid":"248960912","full_name":"Laravel-Backpack/revise-operation","owner":"Laravel-Backpack","description":"An admin interface for venturecraft/revisionable - audit log for your Eloquent entries.","archived":false,"fork":false,"pushed_at":"2025-03-06T10:29:02.000Z","size":64,"stargazers_count":43,"open_issues_count":7,"forks_count":11,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-28T14:06:27.111Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Laravel-Backpack.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":"contributing.md","funding":null,"license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":".github/support.yml","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-21T11:20:45.000Z","updated_at":"2025-02-20T11:12:37.000Z","dependencies_parsed_at":"2024-03-13T10:30:51.111Z","dependency_job_id":"2366ae53-7dc8-4582-ac88-5798a6655f53","html_url":"https://github.com/Laravel-Backpack/revise-operation","commit_stats":{"total_commits":33,"total_committers":8,"mean_commits":4.125,"dds":"0.24242424242424243","last_synced_commit":"8958794984086b9081087939d02b826fe880751d"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Laravel-Backpack%2Frevise-operation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Laravel-Backpack%2Frevise-operation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Laravel-Backpack%2Frevise-operation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Laravel-Backpack%2Frevise-operation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Laravel-Backpack","download_url":"https://codeload.github.com/Laravel-Backpack/revise-operation/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247198450,"owners_count":20900080,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T11:28:44.587Z","updated_at":"2025-04-04T15:07:20.012Z","avatar_url":"https://github.com/Laravel-Backpack.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ReviseOperation for Backpack for Laravel\n\n[![Latest Version on Packagist][ico-version]][link-packagist]\n[![Software License][ico-license]](LICENSE.md)\n[![Build Status][ico-travis]][link-travis]\n[![Total Downloads][ico-downloads]][link-downloads]\n[![StyleCI][ico-styleci]][link-styleci]\n\nAdds an interface for [```venturecraft/revisionable```](https://github.com/VentureCraft/revisionable) to your Backpack CRUDs, so that the admin can:\n- see the changes that have been made to an entry;\n- undo changes;\n\n[```venturecraft/revisionable```](https://github.com/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.\n\nWhen 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:\n\n![https://backpackforlaravel.com/uploads/docs-4-0/operations/revisions.png](https://backpackforlaravel.com/uploads/docs-4-0/operations/revisions.png)\n\n\n## Installation\n\n**Step 1.** Require the package:\n\n``` bash\ncomposer require backpack/revise-operation\n```\n\nThis will automatically install ```venturecraft/revisionable``` too, if it's not already installed.\n\n**Step 2.** Create the Revisions table:\n\n``` bash\ncp vendor/venturecraft/revisionable/src/migrations/2013_04_09_062329_create_revisions_table.php database/migrations/ \u0026\u0026 php artisan migrate\n```\n\n**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.\n\n```php\nnamespace MyApp\\Models;\n\nclass Article extends Eloquent {\n    use \\Backpack\\CRUD\\CrudTrait, \\Venturecraft\\Revisionable\\RevisionableTrait;\n\n    public function identifiableName()\n    {\n        return $this-\u003ename;\n    }\n\n    // If you are using another bootable trait\n    // be sure to override the boot method in your model\n    public static function boot()\n    {\n        parent::boot();\n    }\n}\n```\n\n**Step 4.** In your CrudController, use the operation trait:\n```php\n\u003c?php\n\nnamespace App\\Http\\Controllers\\Admin;\n\nuse Backpack\\CRUD\\app\\Http\\Controllers\\CrudController;\n\nclass CategoryCrudController extends CrudController\n{\n    use \\Backpack\\ReviseOperation\\ReviseOperation;\n```\n\nFor complex usage, head on over to [VentureCraft/revisionable](https://github.com/VentureCraft/revisionable) to see the full documentation and extra configuration options.\n\n## Customizing views\n\nIf 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.\n\n\n## Change log\n\nPlease see the [changelog](changelog.md) for more information on what has changed recently.\n\n## Contributing\n\nPlease see [contributing.md](contributing.md) for details and a todolist.\n\n## Security\n\nIf you discover any security related issues, please email tabacitu@backpackforlaravel.com instead of using the issue tracker.\n\n## Credits\n\n- [Cristian Tabacitu][link-author]\n- [All Contributors][link-contributors]\n\n## License\n\nMIT. Please see the [license file](license.md) for more information.\n\n[ico-version]: https://img.shields.io/packagist/v/backpack/revise-operation.svg?style=flat-square\n[ico-license]: https://img.shields.io/badge/license-dual-blue?style=flat-square\n[ico-downloads]: https://img.shields.io/packagist/dt/backpack/revise-operation.svg?style=flat-square\n[ico-travis]: https://img.shields.io/travis/backpack/revise-operation/master.svg?style=flat-square\n[ico-styleci]: https://styleci.io/repos/248960912/shield\n\n[link-packagist]: https://packagist.org/packages/backpack/revise-operation\n[link-downloads]: https://packagist.org/packages/backpack/revise-operation\n[link-travis]: https://travis-ci.org/backpack/revise-operation\n[link-styleci]: https://styleci.io/repos/248960912\n[link-author]: https://github.com/backpack\n[link-contributors]: ../../contributors\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaravel-backpack%2Frevise-operation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flaravel-backpack%2Frevise-operation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaravel-backpack%2Frevise-operation/lists"}