A Laravel project that showcases task scheduling and artisan commands. It includes a users table with essential fields, a factory and seeder for generating 50,000 users, and an artisan command to export user data to CSV files (limited to 10,000 users per file). The project also implements a scheduler to run the export command weekly.
A Laravel project that demonstrates task scheduling and artisan commands. This application features a user management system with the ability to generate a large dataset and export it efficiently.
This project is open-sourced software licensed under the GNU General Public License v3.0.
- Users Table: Manages user details (name, email, phone, password).
- Factory and Seeder: Generates 50,000 users for testing and development.
- CSV Export Command: Artisan command to export user data into CSV files, with each file limited to 10,000 users.
- Task Scheduler: Configured to run the CSV export command weekly.
- Clone the repository:
git clone [email protected]:kevinmulugu/laravel-task-scheduler.git
- Navigate to the project directory:
cd laravel-task-scheduler - Install the dependencies:
composer install
- Create a copy of the
.envfile: - Generate an application key:
php artisan key:generate
- Storage link:
php artisan storage:link
- Migrate the database:
php artisan migrate
- Seed the database:
- Run command to export users to CSV:
php artisan export:users
Note/Disclaimer: The export command will generate multiple CSV files, each containing 10,000 users. If your pc is slow, you can reduce the number of users to be generated in the
UserSeeder.phpfile. I will update the command to allow the user to specify the number of users to be generated in the future.