- PHP 7.2 (Laravel Framework)
- SQLITE || MySQL Database
- clone the repo
git clone https://github.com/gr8skills/page-assessment.git page_assessment
- Install dependencies
composer install
-
SQLITE || MySQL Database setup in .env file (defaulted to sqlite)
-
create sqlite database file (to use sqlite)
touch database/database.sqlite
- migrate table and seed data
php artisan migrate --seed
- serve the project
php artisan serve
- hit the api below to add more wallet accounts to the seeded users using these parameters [wallet_qty:int, user_qty:int] POST Call
http://127.0.0.1:8000/api/v1/more/wallets
- all users {GET Request}
http://127.0.0.1:8000/api/v1/users
http://127.0.0.1:8000/api/v1/user/id
- All Wallets {GET Request}
http://127.0.0.1:8000/api/v1/wallets
- a wallet’s detail including its owner, type and the transaction history of that wallet {GET Request}
http://127.0.0.1:8000/api/v1/wallet/nuban OR http://127.0.0.1:8000/api/v1/wallet/id
http://127.0.0.1:8000/api/v1/stats
- Send money from one wallet to another {POST Call [Form-data: sender => nuban or id, receiver: nuban or id, amount: double]}
http://127.0.0.1:8000/api/v1/send-money
- A sample sqlite database file (database_sample.sqlite) is included in database folder
- To use this sample instead of creating a new one, rename the file to database.sqlite
- To use MySQL instead of SQLITE, modify the .env file with the correct credentials