This is an implementation of flashcard practice tool.
- A user is hardcoded to ID=1;
- No data validation of questions and answers.
- PHP 8.1 installation with Composer;
- A running Docker instance.
Install the required Composer dependencies with the following command:
composer install
Start the application's instance with:
./vendor/bin/sail up -d
You can stop the application with:
./vendor/bin/sail down
Create all necessary tables:
./vendor/bin/sail artisan migrate
Create a test user:
./vendor/bin/sail artisan db:seed
Start the tool with the following command:
./vendor/bin/sail artisan flashcard:interactive
Asks for a question and a correct answer and creates a new flashcard. There can be no flashcards with the same question.
Displays the table of all available flashcards with their questions and answers.
Will list all available questions and their practice status for the current user:
- unanswered;
- correct;
- incorrect;
A user can pick any question to answer or select
Stop
to quit to the main menu.
Displays the total number of questions, and the amount of questions that got answered at least once and have at least one correct answer.
Will purge the practice progress for the current user.
Will terminate the tool and return to shell.
Run available tests with:
./vendor/bin/sail test