Welcome to Laravel Patcher! This repository provides a reliable system for applying one-time operational or data patches in Laravel. With features like tracking, skipping, and rollback, you can manage your database migrations with confidence.
- Predictable System: Ensure that your patches are applied consistently and reliably.
- Trackable: Keep a record of all applied patches for easy reference.
- Skippable: Decide which patches to apply based on your needs.
- Rollback Ready: Easily revert any patch if needed.
To install Laravel Patcher, follow these steps:
-
Ensure you have a Laravel application set up.
-
Run the following command in your terminal:
composer require shalky/laravel-patcher
-
Publish the configuration file:
php artisan vendor:publish --provider="Shalky\LaravelPatcher\LaravelPatcherServiceProvider"
-
Update your
.env
file as needed.
To apply a patch, use the following command:
php artisan patch:apply {patch-name}
Replace {patch-name}
with the name of your patch.
If you need to skip a patch, you can use:
php artisan patch:skip {patch-name}
To roll back a patch, run:
php artisan patch:rollback {patch-name}
You can view all patches with:
php artisan patch:list
Here’s a simple example of how to create a patch:
- Create a new patch file in the
database/patches
directory. - Add your migration or data operation code.
- Apply the patch using the command above.
We welcome contributions to Laravel Patcher. Please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes.
- Submit a pull request.
Laravel Patcher is licensed under the MIT License. See the LICENSE file for more details.
For the latest releases, please visit Releases. Download the necessary files and execute them as needed.
For any questions or feedback, feel free to reach out:
- GitHub: shalky
- Email: [email protected]
Thank you for checking out Laravel Patcher! We hope it helps you manage your patches effectively. If you encounter any issues, please check the "Releases" section or contact us for assistance.