Download the PHP package iqbalatma/laravel-export-import without Composer
On this page you can find all versions of the php package iqbalatma/laravel-export-import. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-export-import
Laravel Export Import
A simple and extensible Laravel package for handling large data exports and imports using a queue-based architecture.
This package is designed to export and import large datasets efficiently while keeping memory usage low by leveraging Laravel's LazyCollection and queued jobs.
Features
- Queue based export and import jobs
- Memory efficient processing using
LazyCollection - CSV export support
- Extensible architecture using abstract classes
- Automatic temporary file handling
- Configurable filesystem disk support
- Designed for large datasets
Requirements
- PHP >= 8.3
- Laravel >= 10
Installation
Install the package via Composer.
Publish the configuration file:
Publish migrations:
Run migrations:
Configuration
After publishing, the configuration file will be available at:
Example configuration:
Models
Defines the models used internally by the package.
| Key | Description |
|---|---|
| user | The user model responsible for triggering import or export processes |
| import | Model used to store import job information |
| export | Model used to store export job information |
You may replace these models with your own implementations.
Paths
Defines directories used during import and export processes.
| Key | Description |
|---|---|
| export_path | Directory where exported files are stored |
| import_path | Directory where uploaded import files are stored |
| temporary | Temporary directory used while processing files |
Temporary files are automatically cleaned up after processing.
Export/Import Disk
Specifies which filesystem disk will store import files.
This disk must exist in:
Example disks:
- local
- public
- s3
Export Availability
Defines how long exported files remain available for download.
Value is defined in hours.
Examples:
| Value | Meaning |
|---|---|
| 24 | File expires after 1 day |
| 72 | File expires after 3 days |
| 168 | File expires after 7 days |
How to export
To start export data you can use trait InteractWithExport
Example :
Export Workflow
The export process follows this workflow:
This workflow ensures that exports are handled efficiently and safely.
Export Lifecycle Hooks
You can override lifecycle hooks to customize the export process.
After Export
How to Import
To start export data you can use trait InteractWithImport
Example :
Contributing
Contributions are welcome.
- Fork the repository
- Create a new branch
- Submit a pull request
License
This package is open-sourced software licensed under the MIT license.