[Software design]vue+threejs+elementUI+larvel+mysql development enterprise intranet 3D model library (7)

Task today

  1. Deploy lavarel environment on windows
  2. Connect to the database
  3. Make a post login interface (not necessary to complete)
  4. Cookie generation during login process (not necessary to complete)
  5. Use the get interface for login verification (not necessary to complete)
  6. Use vue for login test (not necessary to complete)

step

Install php

Insert picture description here


Insert picture description here

Install composer to
find a folder and operate a wave

php -r "copy('https://install.phpcomposer.com/installer', 'composer-setup.php');"
php composer-setup.php
php -r "unlink('composer-setup.php');"

Windows system:

  找到并进入 PHP 的安装目录(和你在命令行中执行的 php 指令应该是同一套 PHP)。
  将 composer.phar 复制到 PHP 的安装目录下面,也就是和 php.exe 在同一级目录。
  在 PHP 安装目录下新建一个 composer.bat 文件,并将下列代码保存到此文件中。
@php “%~dp0composer.phar” %*
composer --version
Insert picture description here


Completed the installation on windows

linux (centos8) system leave it
blank to add later

  1. Install Laravel
    Use Composer to install the Laravel installer
composer global require laravel/installer

Add lavarel path to

Insert picture description here


refresh system variables

refreshenv
laravel new x_modellibrary_backend

Start the installation

Insert picture description here


Installation is complete

Insert picture description here


Insert picture description here


4. Configure the contents of the small leather panel, and access

Insert picture description here


Insert picture description here


5. Configure.env

Insert picture description here

Remove cache

Insert picture description here


Insert picture description here


pseudo-static configuration (emphasis, otherwise an error will be reported)

Insert picture description here


6. Configure database-database-table-structure-data

Insert picture description here


7. Create model

php artisan make:model user
Insert picture description here


8. Configure routing and controller

Insert picture description here
php .\artisan make:controller Login
Insert picture description here


9. Performance effect

Insert picture description here

to sum up

Today, laravel is mainly used to call the background data. The pseudo-static place takes a relatively long time. The data part is still different from tp. The effect today is already very good
. The content to be carried out tomorrow is the login interface. The writing of the post, and the problem of the cookie are solved.