A demo system where users can buy credits to purchase products within the platform.
Clone this repo and run commands in the order below:
composer install
cp .env.example .env # And edit the values
php artisan key:generate
Then start Docker containers using Sail:
sail up -d
And run the migrations:
sail artisan migrate
sail artisan db:seed # Optional
Open another terminal tab and run the command below to compile front-end assets:
sail yarn install
sail yarn run watch
Now you can access the project at http://localhost in the browser.
To run tests, first create a database named "testing-laravel"
CREATE DATABASE "testing-laravel";
And run the following command:
sail artisan test
# sail artisan test --filter GetUserTest
# sail artisan test --filter "Deve retornar um erro ..."
# sail artisan test --stop-on-failure
NOTE: Make sure you started the docker containers first.