This document is a v3 version document. If you need to use v2.x 'version, please send it to here (opens new window)

Current version: GitHub last release

# Synopsis

# Foreword

I have done shopping malls many times before. Each time, it is time-consuming to develop from scratch. Later, after I became familiar with the process, I wrote a set of requirements that are convenient for product managers to quickly go online.

Welcome star, welcome PR!

fork star star

GitHub (opens new window) Gitee (opens new window)

Exchange QQ group:1062159788 - Private QQ:364825702 please note Qingwu mall

# Operating Environment

PHP : 7.4 | ^8.0

MySql >= 5.6

Apache || Nginx = *

node >= 10.*

composer >= 1.*

[key] please go to the corresponding official website to familiarize yourself with the relevant documents of laravel8 and vue3 before the second session

# Quick installation

composer create-project qingwuit/qwshop shop

# Manually build the database - the project will not build its own database, but will insert data according to the database account password you fill in
php artisan qwshop:install 
# [if the execution fails, check whether the document [PHP configuration] is correct]

# The following two items require node environment installation. Please NPM -v to check whether it is installed or search for nodejs installation by yourself
npm install
npm run prod

## Linux needs to give permission to windows without execution
chmod -R 777 ./storage/

# Docker installation

git clone https://github.com/qingwuit/qwshop.git  # https://gitee.com/qingwuitcn/qwshop.git

cd qwshop/dockerfiles # Enter directory

docker-compose up -d  # By default, you have installed [docker]

docker exec -it dockerfiles_qwshop_1 /bin/sh # Enter the workbench

./dockerfiles/install.sh # If the installation item cannot be run due to permissions: sh ./dockerfiles/install.sh

# Manual installation

1、Download the corresponding version github (opens new window) Gitee (opens new window)

Or

# If git Bash is installed, you can clone
git clone https://github.com/qingwuit/qwshop.git
# Or
git clone https://gitee.com/qingwuitcn/qwshop.git

2、Copy root directory .env.example is .env

3、Modify .env database

4、Download PHP composer extension

composer install

5、Execute the following command in the root directory

php artisan key:generate # key
php artisan passport:keys --ansi # key
php artisan storage:link # link

6、Import SQL file

php artisan migrate # 
php artisan qwshop:mysql # import initial data

7、Download the front-end extension [it is predicted here that you have installed the node suite]

npm install
# You can also use Taobao image
# npm install --registry=https://registry.npm.taobao.org --force

# Front end code packaging
npm run prod

## Linux needs to give permission to windows without execution
chmod -R 777 ./storage/

# Nginx configuration

# Reference code
listen  80;
server_name localhost;
root  /var/www/laravel-app/public; # Resolve directory to project public
index  index.html index.htm index.php;
...

#Pseudo static code [many people here forget to cause interface 404]
location / {
    try_files $uri $uri/ /index.php?$query_string;
}

# PHP configuration

# php.ini INI file
'shell_exec','exec','symlink','proc_open','putenv'
# php.ini search one by one to see if it has been deleted. If it has not been deleted, delete it [if it is still unable to execute the error reading, delete it again]

# Mall login

  • 【general backstage】 /Admin/login - admin 123456
  • 【merchant background】 /Seller/login - 18888888888 123456
  • 【user background】 /login - 18888888888 123456

[key] remember that the path case must be the same, for example:/Admin/login cannot be /admin/login otherwise, you will be unable to log in and then jump back

# Frequently asked questions

  • You need to configure the PHP environment, and node environment by yourself (try to use the domestic image when installing the extension)

  • NPM run packaging process failed. Please check whether node sass or corejs has been downloaded successfully, and try downloading again or go to Taobao image to determine whether the node version is too low

  • [cannot be opened after installation]. Do you forget to configure pseudo static ngnix Linux? Check whether Chmod -r 777 storage is given permission

  • [cannot be opened after installation], whether to resolve the directory to public, and whether to configure laravel pseudo static under nginx

  • [cannot be opened after installation]. Is the domain name filled in PHP artist qwshop:install consistent with the domain name you are currently visiting

  • [unable to log in]. Whether to use 'PHP artisan serve' to access is not accessible. It will conflict with passport. It is best to build a server-side environment, such as nginx or an integrated environment

  • Interface 502 can be opened by opening the interface separately. Check the nginx log to see if the header transfer is too large. Close the 'debug' of 'env'. If not, please modify the nginx configuration file