onethirtyone / laravel-s3-migrate
A Laravel package to migrate from local storage to Amazon S3
Installs: 9 693
Dependents: 0
Suggesters: 0
Security: 0
Stars: 6
Watchers: 3
Forks: 5
Open Issues: 5
Requires
- php: ^7.2.5|^8.0
- illuminate/container: ^7.0|^8.0
- illuminate/contracts: ^7.0|^8.0
- league/flysystem-aws-s3-v3: ^1.0
Requires (Dev)
- orchestra/testbench: ^5.0|^6.0
- phpunit/phpunit: ^8.5|^9.0
This package is auto-updated.
Last update: 2025-03-01 00:32:06 UTC
README
Migrate files in local storage to an AWS S3 Bucket
Installation
Install with composer
composer require onethirtyone/laravel-s3-migrate
Publish the config
php artisan vendor:publish --tag=s3migrate-config
Usage
in config/s3migrate.php
set your configuration options
Run the artisan command
php artisan onethirtyone:s3-migrate {--force : Migrates without confirmation prompt}
This will migrate all files in your selected local disks to S3.
When the migration is complete a OneThirtyOne\S3Migration\Events\S3MigrationCompleted
event will be fired. The event will receive a collection of Illuminate\Support\File
files. These are the files that have been migrated.
You should listen for this event to perform actions locally such as updating a database table with the new S3 image path or delete the local storage files.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.