Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Sample application for Laracon Online 2022.

NotificationsYou must be signed in to change notification settings

avosalmon/modular-monolith-laravel

Repository files navigation

The sample e-commerce application for Laracon Online Winter 2022.

System requirements

Docker is installed on your machine.

Setup local environment

Copy example env file

cp .env.example .env

Start docker compose

docker compose up -d

Install composer dependencies

docker composeexec app composer install

Generate app key and places inside the .env file

docker composeexec app php artisan key:generate

Run DB migration

docker composeexec app php artisan migrate:fresh --seed

Now you can access the app viahttp://localhost.

To stop Docker containers

docker compose down

Laravel Sail command (optional)

This repository usesLaravel Sail for the local docker environment. You can use thesail command by configuring a bash alias below.

alias sail='[ -f sail ] && bash sail || bash vendor/bin/sail'

Thesail command is an shortcut fordocker compose exec app php which runs a given command within the docker container. Thedocker compose commands in the previous section can be shortened like this.

sail composer installsail artisan key:generatesail artisan migrate:fresh --seed

Testing

This repository usesPest for writing tests. Pest is a testing framework with a simpler syntax likeJest and better reporting. Since it's powered by PHPUnit, it supports all the PHPUnit syntaxes as well.

Running tests

sailtest

Filtering tests

sailtest --filter OrderControllerTest

Display code coverage

sailtest --coverage --min=80

Static code analysis to enforce domain boundaries

Deptrac 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 rundeptrac with the command below.

sailexec app ./vendor/bin/deptrac

You can also visualize the dependency graph by exporting the analysis result as an image.

sailexec app ./vendor/bin/deptrac --formatter=graphviz-image --output="./deptrac.png"

About

Sample application for Laracon Online 2022.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors2

  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp