This project is built with Laravel and is used as a base for future projects. It is a simple project that has some simple changes to the default Laravel project.
- Docker
- Docker-compose
To make this process easier I recommend using the laravel sail alias. To do this you can add the following alias to your
.bashrc
or .zshrc
file:
alias sail='sh $([ -f sail ] && echo sail || echo vendor/bin/sail)'
- Clone the repository
- Run
composer install
with this command:
docker run --rm \
-u "$(id -u):$(id -g)" \
-v "$(pwd):/var/www/html" \
-w /var/www/html \
laravelsail/php83-composer:latest \
composer install --ignore-platform-reqs
- Copy the
.env.example
file to.env
and fill in the necessary information - Start laravel sail with the following command:
sail up -d
# or if you don't have the alias
./vendor/bin/sail up -d
- Generate the application key with the following command:
sail artisan key:generate
# or if you don't have the alias
./vendor/bin/sail artisan key:generate
- Run the migrations with the following command:
sail artisan migrate
# or if you don't have the alias
./vendor/bin/sail artisan migrate
- Run the seeders with the following command:
sail artisan db:seed
# or if you don't have the alias
./vendor/bin/sail artisan db:seed
- Run npm install with the following command:
sail npm install
# or if you don't have the alias
./vendor/bin/sail npm install
- Run npm run dev with the following command:
sail npm run dev
# or if you don't have the alias
./vendor/bin/sail npm run dev
- Run the tests with the following command:
sail artisan test
# or if you don't have the alias
./vendor/bin/sail artisan test
Domains
└── Product
├── Console
│ └── Commands
│ └── ProductSyncCommand.php
├── Events
├── Database
│ ├── Factories
│ ├── Migrations
│ └── Seeders
├── Exceptions
├── Http
│ ├── Controllers
│ │ ├── ProductController.php
│ │ └── ProductDetailController.php
│ ├── Middleware
│ └── Requests
│ └── ProductRequest.php
├── Jobs
│ └── ProductSync.php
├── Models
│ └── Product.php
├── Providers
├── Repositories
│ └── ProductRepository.php
├── Tests
│ ├── Feature
│ │ ├── ProductControllerTest.php
│ │ └── ProductDetailControllerTest.php
│ └── Unit
│ └── ProductRepositoryTest.php
│ └── Integration
│ └── ProductSyncTest.php
├── resources
│ ├── css
│ ├── js
│ └── views
│ └── product // This is the domain name and should be the same as the domain name
│ └── home.blade.php
├── routes
│ ├── web.php
│ ├── api.php
└── Services