sagar-s-bhedodkar/auto-reset 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

sagar-s-bhedodkar/auto-reset

最新稳定版本:v1.0.1

Composer 安装命令:

composer require --dev sagar-s-bhedodkar/auto-reset

包简介

Automate `php artisan migrate:fresh` + seeding + cleanup for local Laravel development environments.

README 文档

README

License: MIT
Latest Version

Automate php artisan migrate:fresh + seeding + cleanup for local Laravel development environments.

Table of Contents

Introduction

Laravel AutoReset is a simple yet powerful package designed to automate repetitive database reset tasks during local development.

Instead of running multiple commands (migrate:fresh, db:seed, cache:clear, etc.), you can now do it all with a single command:

php artisan dev:reset

This improves your development workflow, reduces human errors, and saves time.

Features

  • Reset the database and run migrations automatically.
  • Seed database optionally with default or specific seeders.
  • Clear cache, configuration, and views automatically.
  • Optional cleanup of storage directories.
  • Environment safety: works only in local or testing environments.
  • Works with Laravel 9, 10, 11, and 12.

Installation

  1. Navigate to your Laravel project:
cd your-laravel-project
  1. Require the package:
  • From GitHub (if not on Packagist yet):
composer require sagar-s-bhedodkar/auto-reset:*@dev
  • From Packagist (once published):
composer require sagar-s-bhedodkar/auto-reset
  1. Publish the configuration (optional):
php artisan vendor:publish --provider="Laravel\AutoReset\Providers\AutoResetServiceProvider" --tag=config

Configuration

After publishing, edit config/auto-reset.php to:

  • Set default seeders.
  • Configure storage directories to clean.
  • Enable/disable post-reset commands.

Example:

return [
    'default_seeders' => [
        \Database\Seeders\UserSeeder::class,
        \Database\Seeders\ProductSeeder::class
    ],
    'storage_cleanup' => true,
    'cleanup_paths' => ['storage/app/public'],
];

Usage

Run the main command:

php artisan dev:reset

Optional arguments:

  • Run specific seeders:
php artisan dev:reset --seed=UserSeeder,ProductSeeder
  • Clean storage directories:
php artisan dev:reset --storage
  • The command never runs in production for safety.

Contributing

  1. Fork the repository.
  2. Create a new branch:
git checkout -b feature/my-feature
  1. Make your changes, write tests, and commit:
git commit -m "Add feature XYZ"
  1. Push to your fork:
git push origin feature/my-feature
  1. Open a Pull Request.

All contributions are welcome!

License

This package is licensed under MIT License – see the LICENSE file for details.

Support

统计信息

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

GitHub 信息

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

其他信息

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