Recommend this page to a friend! |
![]() ![]() |
Info | ![]() |
![]() |
![]() ![]() |
Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2024-06-14 (6 days ago) ![]() | Not yet rated by the users | Total: Not yet counted | Not yet ranked |
Version | License | PHP version | Categories | |||
apl-test 1.0 | MIT/X Consortium ... | 7 | Files and Folders, Libraries, Design ..., P... |
Description | Author | ||||||||||||||
This package can process large CSV files using Laravel queues. |
|
Create a small sample application using common APL tools & languages. The application will need to import a large CSV file (100k records) into a queue, where a background worker will process each individual record.
composer install
php vendor/bin/homestead make
or by copying the attached _Homestead.yaml_ file to your project directory and run
vagrant up
vagrant ssh
copy .env.example .env
php artisan migrate
php artisan queue:table
This application can generate users in csv
, json
format.
To generate a list of users, use the following command:
php artisan generate:users {format} {count=10} {filename=users}
This command will generate a users.csv file containing 100000 users to the default storage directory.
Currently there are two formats supported: json and csv. For more info, see the app/Extension/HandleItemsList
and app/Extension/HandleItemsList
folders for more info about further format implementations.
__Example:__
This will generate a users.csv file with 100000 user data
php artisan generate:users csv 100000
This command will generate a users.json file with 100000 users data.
php artisan generate:users json 100000
Start the workers:
php artisan queue:work --queue=users
To load a file into the users table, run the below command
php artisan load:users {format=csv} {filename=users}
__Example:__
This will load the users.csv file into the users table
php artisan load:users csv users
This will load the users.json file into the users table
php artisan generate:users json 100000
In order to properly run tests, the .env.testing file has to be completed. After the above is completed, run:
php artisan test
Andras Zoltan Gyarfas - Zoli
![]() |
File | Role | Description | ||
---|---|---|---|---|
![]() |
||||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Doc. | Documentation |
Version Control | Unique User Downloads | |||||||
100% |
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.