This is a sample project to simulate order tracking in general online store. This scenario we would like to focus on basic transaction that happens in general online store in Indonesia.
Make sure to read official lumen installation page. In this project, postgresql
is the main database. Make sure you have access to the database.
Here is some references for Postgresql :
- https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-16-04
- https://www.linode.com/docs/databases/postgresql/use-postgresql-relational-databases-on-ubuntu-16-04
- https://www.digitalocean.com/community/tutorials/how-to-use-roles-and-manage-grant-permissions-in-postgresql-on-a-vps--2
cd /var/www
git clone git@github.com:clasense4/lumen-order-tracking.git
cd lumen-order-tracking
composer install
cp .env.example .env
Change .env
as necessary, here is some variable that need to take look closer
DB_HOST
, usuallylocalhost
or127.0.0.1
or another IP.DB_PORT
, usually5432
.DB_DATABASE
, make sure it is correct.DB_USERNAME
, make sure it is correct user.DB_PASSWORD
, make sure it is correct password.
cd /var/www/lumen-order-tracking
php artisan migrate:refresh --seed
cd /var/www/lumen-order-tracking
php -t public/ -S 0.0.0.0:8080
# do not close for now
# open new tab
cd /var/www/lumen-order-tracking
vendor/bin/phpunit
I have included Insomnia Rest file to get start with this projects. Import salestock.rest
. Read more.
Well, it must be cache problem, try to install it with composer install -vvv --profile --prefer-source
.