The sample e-commerce application for Laracon Online Winter 2022. You can also find the slides here.
Docker is installed on your machine.
Copy example env file
cp .env.example .envInstall composer dependencies
docker run --rm \
-u "$(id -u):$(id -g)" \
-v $(pwd):/var/www/html \
-w /var/www/html \
laravelsail/php81-composer:latest \
composer install --ignore-platform-reqsThis repository uses Laravel Sail for the local docker environment. You can use the sail command by configuring a bash alias below.
alias sail='[ -f sail ] && bash sail || bash vendor/bin/sail'Start docker containers
sail up -dGenerate app key and places inside the .env file
sail artisan key:generateRun DB migration
sail artisan migrate:fresh --seedNow you can access the app via http://localhost.
sail composer testDeptrac is a static code analysis tool for PHP that helps you define architectual layers over classes and rules on which layer can access which layer.
You can run deptrac with the command below.
sail exec app deptracYou can also visualize the dependency graph by exporting the analysis result as an image.
sail exec app deptrac --formatter=graphviz-image --output="./deptrac.png"