Download the PHP package dandysi/laravel-batch-upload without Composer
On this page you can find all versions of the php package dandysi/laravel-batch-upload. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-batch-upload
Laravel Batch Upload
A framework to help manage/automate/process data uploads (such as CSV), using your business logic. It has potential to be much more than just a databse update tool.
- Scheduling - Define when you would like uploads to be processed
- Validation - Add rules to ensure that data is valid before being processed and provide feedback on any failures
- Configurable - Global or granular per processor
- Headless - Create the frontend and approval process to suite your exact needs
Install
Config
Configure this package by changing the values in config/batch-upload.php
.
Getting Started
The first step is to create a processor (an engine for processing row data). It is a simple PHP class and can be created with the following maker command:
Add the processor to the config/batch-upload.php
config file.
Define the columns/validation rules and implement code to handle the uploaded row data.
Creating Batches
Ordinarily this would not be in one step, however the below outlines all the required stages.
If validation errors occur, they will be recorded against each row and the status of the batch/row will reflect this.
Scheduled Batches
Schedule batches with an additional option and not performing step 3 above.
To ensure scheduled batches are dispatched you will need to add a schedule command in the console kernel:
or create your own cron entry to execute the following:
User Batches
If your batches need to be identifiable by users, another option can be added during the creation step:
Console Commands
Create and dispatch a batch straight away:
delay by minutes
--delay=60
or indentify with a user--user=user123
. Delays will require the schedule command/cron step outlined above to be in place.
License
Open-sourced software licensed under the MIT license.