Recommend this page to a friend! |
Download .zip |
Info | Documentation | View files (82) | Download .zip | 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
Files |
File | Role | Description | ||
---|---|---|---|---|
apl-csv-handler (12 files, 8 directories) | ||||
Homestead.yaml | Data | Auxiliary data | ||
README.md | Doc. | Documentation |
Files | / | apl-csv-handler |
File | Role | Description | ||
---|---|---|---|---|
app (8 directories) | ||||
bootstrap (1 file) | ||||
config (14 files) | ||||
database (3 directories) | ||||
public (4 files) | ||||
resources (3 directories) | ||||
routes (4 files) | ||||
tests (2 files, 2 directories) | ||||
.editorconfig | Data | Auxiliary data | ||
.env.example | Data | Auxiliary data | ||
.env.testing | Data | Auxiliary data | ||
.styleci.yml | Data | Auxiliary data | ||
artisan | Class | Class source | ||
composer.json | Data | Auxiliary data | ||
composer.lock | Data | Auxiliary data | ||
package.json | Data | Auxiliary data | ||
phpunit.xml | Data | Auxiliary data | ||
README.md | Doc. | Documentation | ||
server.php | Aux. | Auxiliary script | ||
webpack.mix.js | Data | Auxiliary data |
Files | / | apl-csv-handler | / | app |
File | Role | Description | ||
---|---|---|---|---|
Console (1 file, 1 directory) | ||||
Exceptions (1 file) | ||||
Extensions (2 directories) | ||||
Helpers (1 file) | ||||
Http (1 file, 2 directories) | ||||
Jobs (1 file) | ||||
Models (1 file) | ||||
Providers (5 files) |
Files | / | apl-csv-handler | / | app | / | Console |
File | Role | Description | ||
---|---|---|---|---|
Commands (3 files) | ||||
Kernel.php | Class | Class source |
Files | / | apl-csv-handler | / | app | / | Console | / | Commands |
File | Role | Description |
---|---|---|
AbstractUsersListCommand.php | Class | Class source |
GenerateUsersListCommand.php | Class | Class source |
LoadUsersListCommand.php | Class | Class source |
Files | / | apl-csv-handler | / | app | / | Extensions |
File | Role | Description | ||
---|---|---|---|---|
GenerateUserList (2 files) | ||||
HandleItemsList (2 files) |
Files | / | apl-csv-handler | / | app | / | Extensions | / | GenerateUserList |
File | Role | Description |
---|---|---|
HandleCsvUserList.php | Class | Class source |
HandleJsonUserList.php | Class | Class source |
Files | / | apl-csv-handler | / | app | / | Extensions | / | HandleItemsList |
File | Role | Description |
---|---|---|
AbstractHandleItemsList.php | Class | Class source |
HandleItemsListContract.php | Class | Class source |
Files | / | apl-csv-handler | / | app | / | Http |
File | Role | Description | ||
---|---|---|---|---|
Controllers (1 file) | ||||
Middleware (8 files) | ||||
Kernel.php | Class | Class source |
Files | / | apl-csv-handler | / | app | / | Http | / | Controllers |
File | Role | Description |
---|---|---|
Controller.php | Class | Class source |
Files | / | apl-csv-handler | / | app | / | Http | / | Middleware |
File | Role | Description |
---|---|---|
Authenticate.php | Class | Class source |
EncryptCookies.php | Class | Class source |
PreventRequestsDuringMaintenance.php | Class | Class source |
RedirectIfAuthenticated.php | Class | Class source |
TrimStrings.php | Class | Class source |
TrustHosts.php | Class | Class source |
TrustProxies.php | Class | Class source |
VerifyCsrfToken.php | Class | Class source |
Files | / | apl-csv-handler | / | app | / | Providers |
File | Role | Description |
---|---|---|
AppServiceProvider.php | Class | Class source |
AuthServiceProvider.php | Class | Class source |
BroadcastServiceProvider.php | Class | Class source |
EventServiceProvider.php | Class | Class source |
RouteServiceProvider.php | Class | Class source |
Files | / | apl-csv-handler | / | config |
File | Role | Description |
---|---|---|
app.php | Class | Class source |
auth.php | Class | Class source |
broadcasting.php | Aux. | Auxiliary script |
cache.php | Aux. | Auxiliary script |
cors.php | Aux. | Auxiliary script |
database.php | Aux. | Auxiliary script |
filesystems.php | Aux. | Auxiliary script |
hashing.php | Aux. | Auxiliary script |
logging.php | Class | Class source |
mail.php | Aux. | Auxiliary script |
queue.php | Aux. | Auxiliary script |
services.php | Aux. | Auxiliary script |
session.php | Aux. | Auxiliary script |
view.php | Aux. | Auxiliary script |
Files | / | apl-csv-handler | / | database |
File | Role | Description | ||
---|---|---|---|---|
factories (1 file) | ||||
migrations (5 files) | ||||
seeders (1 file) |
Files | / | apl-csv-handler | / | database | / | factories |
File | Role | Description |
---|---|---|
UserFactory.php | Class | Class source |
Files | / | apl-csv-handler | / | database | / | migrations |
File | Role | Description |
---|---|---|
2014_10_12_000000_create_users_table.php | Class | Class source |
2014_10_12_100000_...rd_resets_table.php | Class | Class source |
2019_08_19_000000_...iled_jobs_table.php | Class | Class source |
2021_02_08_085713_...ted_at_to_users.php | Class | Class source |
2021_02_08_090418_create_jobs_table.php | Class | Class source |
Files | / | apl-csv-handler | / | database | / | seeders |
File | Role | Description |
---|---|---|
DatabaseSeeder.php | Class | Class source |
Files | / | apl-csv-handler | / | public |
File | Role | Description |
---|---|---|
.htaccess | Data | Auxiliary data |
index.php | Class | Class source |
robots.txt | Doc. | Documentation |
web.config | Data | Auxiliary data |
Files | / | apl-csv-handler | / | resources |
Files | / | apl-csv-handler | / | resources | / | js |
File | Role | Description |
---|---|---|
app.js | Data | Auxiliary data |
bootstrap.js | Data | Auxiliary data |
Files | / | apl-csv-handler | / | resources | / | lang | / | en |
File | Role | Description |
---|---|---|
auth.php | Aux. | Auxiliary script |
pagination.php | Aux. | Auxiliary script |
passwords.php | Aux. | Auxiliary script |
validation.php | Aux. | Auxiliary script |
Files | / | apl-csv-handler | / | resources | / | views |
File | Role | Description |
---|---|---|
welcome.blade.php | Aux. | Auxiliary script |
Files | / | apl-csv-handler | / | routes |
File | Role | Description |
---|---|---|
api.php | Example | Example script |
channels.php | Example | Example script |
console.php | Example | Example script |
web.php | Aux. | Auxiliary script |
Files | / | apl-csv-handler | / | tests |
File | Role | Description | ||
---|---|---|---|---|
Feature (1 file) | ||||
Unit (1 file) | ||||
CreatesApplication.php | Class | Class source | ||
TestCase.php | Class | Class source |
Files | / | apl-csv-handler | / | tests | / | Feature |
File | Role | Description |
---|---|---|
GenerateAndLoadUsersListTest.php | Class | Class source |
Files | / | apl-csv-handler | / | tests | / | Unit |
File | Role | Description |
---|---|---|
GenerateAndLoadUsersListTest.php | Class | Class source |
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.