承接 bakgul/file-history 相关项目开发

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

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

bakgul/file-history

Composer 安装命令:

composer require bakgul/file-history

包简介

This is a helper package, and it can't be used independently. Its purpose is to log the changes of files when they are created/deleted/updated through the commands shipped with the packages, which are part of Packagified Laravel. So this package can't track the changes made manually.

README 文档

README

This is a helper package, to keep/undo/redo file history when files are created/deleted/updated via console commands of my other packages.

That being said, I don't see any reason not be able to use it outside console independantely. But I've never tried it.

Installation

sail composer require bakgul/file-history --dev

Optionally, you can publish package's config file

sail artisan vendor:publish --tag=file-history

Commands

This package contains 3 console commands. They are quite self-explanatory and don't expect any arguments or options.

sail artisan file-history:delete
sail artisan file-history:redo
sail artisan file-history:undo

Usage

First, you should use HasHistory trait on command file and call $this->logFile(); in handle() method. This will generate a history file to use during current command's lifecycle.

Then you should execute the following code before you create/update/delete a file/folder:

use Bakgul\FileHistory\FileHistory;

FileHistory::set(
    path: 'path to file',
    isDir: true/false,
    isCreated: true/false
);

License

This is open-sourced software licensed under the MIT license.

统计信息

  • 总下载量: 174
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 8
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-05-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固