By Erfan Ebrahimi
-
Need php version 8.1 or upper
-
Download project form Git
git clone https://github.com/yeganehha/sellcoin sellcoin
cd sellcoin
composer install
-
Then open
.env
file and config database and setting of coins cache -
Also, you can update setting from
config/setting.php
-
Then
php artisan migrate --seed
php artisan serve
-
Then open http://127.0.0.1:8000
-
In other terminal use bellow command:
[ Imporant ]
PHP artisan queue:listen
For adding new platform driver just need to call:
PHP artisan make:platform <name>
Use coingecko.com
Use MockHandler
to filter coins and show some coingecko.com As a result; the sent list will be different for Binance and CoinEx.
Because a mistake might happen and imagine that the list of coins is not received from the api and is read from the database. I decided to put the purchased coin in the order table even though it was wrong.
To run tests, run the following command
php artisan test