Import users from CSV files.
- Clone project
- Run
composer installcommand - Add database details in the
.envfile - Run
php artisan:migratecommand
- To create a user:
php artisan user:create - To delete a user:
php artisan user:delete {id} - To find a user:
php artisan user:findand use one of allowed options:{--firstname=}- Find user by the first name{--lastname=}- Find user by the last name{--email=}- Find user by the email{--phonenumber1=}- Find user by the first phone number{--phonenumber2=}- Find user by the second phone number{--comment=}- Find user by the part of the comment
- To import users from the file:
php artisan user:import {filename}and provide a csv filename. If file was not provided, you will be asked to input it.
- To import a file it should be in
/storagedirectory - There are 3 demo files to run the tests
- First name, Last name, Email, Phone number #1 are required. Phone number2, commment are optional.
- If file contains duplicated records, they are skipped and at the end of import, there will be a message how many of them were not imported.