承接 sagar-s-bhedodkar/laravel-dev-snapshot 相关项目开发

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

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

sagar-s-bhedodkar/laravel-dev-snapshot

最新稳定版本:v1.0.3

Composer 安装命令:

composer require sagar-s-bhedodkar/laravel-dev-snapshot

包简介

Dev environment snapshot and restore for Laravel (DB + storage + config + env)

README 文档

README

Automate Laravel development environment snapshots and restores — database, storage, and environment configuration — all in one command.

License: MIT Laravel Packagist GitHub stars

📘 Table of Contents

🚀 Introduction

Laravel Dev Snapshot is a lightweight package that helps developers manage their local environment snapshots easily.

Instead of manually exporting your database, copying .env, or saving config files — do it all with a single command:

php artisan dev:snapshot
php artisan dev:restore snapshot_name

This helps reset your local environment safely, reproduce bugs, or sync data across developers in seconds.

✨ Features

  • 📦 Create and restore full development snapshots
  • 🧠 Includes database, storage, .env, and configuration files
  • ⚙️ Works only in local or testing environments (for safety)
  • 🪶 Simple Artisan commands (dev:snapshot, dev:restore)
  • 💾 Optional compression to ZIP files
  • 🧹 Clean and easy rollback system

⚙️ Installation

Require the package via Composer:

composer require sagar-s-bhedodkar/laravel-dev-snapshot --dev

🔧 Configuration

Publish the configuration file:

php artisan vendor:publish --provider="SagarSBhedodkar\LaravelDevSnapshot\Providers\DevSnapshotServiceProvider" --tag=config

The configuration will appear at config/dev-snapshot.php:

return [
    'snapshot_path' => env('DEV_SNAPSHOT_PATH', 'snapshots'),
    'include_storage_paths' => ['storage/app/public'],
    'include_env' => true,
    'include_config_paths' => ['config/app.php'],
    'exclude_tables' => [],
    'compress' => true,
    'allowed_environments' => ['local', 'testing'],
];

🧠 Usage

➕ Create a snapshot

php artisan dev:snapshot

Optionally name your snapshot:

php artisan dev:snapshot --name=my-local-backup

♻️ Restore a snapshot

php artisan dev:restore snapshot-20251012-abc123

🧩 Example Workflow

  1. You make large DB or storage changes.
  2. Run:
    php artisan dev:snapshot --name=pre-test
  3. After testing, restore the environment:
    php artisan dev:restore pre-test
  4. Your DB, env, and storage are restored to that state instantly.

🛡️ Safety

Snapshots and restores will only run in local or testing environments.

The package will refuse to execute in production to avoid data loss.

🤝 Contributing

Contributions are welcome!

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/new-feature
  3. Commit your changes: git commit -m "Add new feature"
  4. Push to your fork: git push origin feature/new-feature
  5. Submit a Pull Request 🎉

📄 License

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

👨‍💻 Author

Sagar Sunil Bhedodkar
📧 sagarbhedodkar456@gmail.com
🌐 GitHub Profile

Made with ❤️ for Laravel developers who value automation, safety, and simplicity.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-10-12