Menu Close

import-file-csv

Require

PHP 8.1 or later
MySQL 8.0 or later

Setup

  1. Composer install dependencies

If use native environment:

composer install

If use docker environment:

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-reqs
  1. Create database

  2. Copy .env.example to .env

cp .env.example .env
  1. Update database connection and redis connection on .env

If you use Docker, set DATABASE_HOST=mysql and REDIS_HOST=redis.
In this step, you can update another configuration in dotenv file.

  1. Setup Docker service first time (only Docker)
./vendor/bin/sail up -d

TIP: you can set sail is alias of ./vendor/bin/sail in ~/.zshrc or ~/.bash_profile.

  1. Run database migrations and database seeding.

# on native environment
php artisan migrate
  1. Run build file css and js
npm install
npm run dev
View Source Code
Posted in Development