下载架子(感觉这个Laravel和Spring Boot框架太像了):
composer create-project laravel/laravel 你的项目名 --prefer-dist "8.*" --ignore-platform-req=ext-fileinfo
成功后:
使用phpStorm打开
进行相关配置:
注意,Laravel8最低都有php7.3
下面是配置启动:
配置好名称和其他入口目录:
运行:
查看结果:
成功
这里有一点要注意的,要拷贝一个.env出来
- APP_NAME=Laravel
- APP_ENV=local
- APP_KEY=base64:0g0oXiRYApAUiSTnpf2Rk+e8QjcbcJE5Ld5DaPHlBG4=
- APP_DEBUG=true
- APP_URL=http://localhost
-
- LOG_CHANNEL=stack
- LOG_DEPRECATIONS_CHANNEL=null
- LOG_LEVEL=debug
-
- DB_CONNECTION=mysql
- DB_HOST=127.0.0.1
- DB_PORT=3306
- DB_DATABASE=it1995
- DB_USERNAME=root
- DB_PASSWORD=root
-
- BROADCAST_DRIVER=log
- CACHE_DRIVER=file
- FILESYSTEM_DRIVER=local
- QUEUE_CONNECTION=sync
- SESSION_DRIVER=file
- SESSION_LIFETIME=120
-
- MEMCACHED_HOST=127.0.0.1
-
- REDIS_HOST=127.0.0.1
- REDIS_PASSWORD=null
- REDIS_PORT=6379
-
- MAIL_MAILER=smtp
- MAIL_HOST=mailhog
- MAIL_PORT=1025
- MAIL_USERNAME=null
- MAIL_PASSWORD=null
- MAIL_ENCRYPTION=null
- MAIL_FROM_ADDRESS=null
- MAIL_FROM_NAME="${APP_NAME}"
-
- AWS_ACCESS_KEY_ID=
- AWS_SECRET_ACCESS_KEY=
- AWS_DEFAULT_REGION=us-east-1
- AWS_BUCKET=
- AWS_USE_PATH_STYLE_ENDPOINT=false
-
- PUSHER_APP_ID=
- PUSHER_APP_KEY=
- PUSHER_APP_SECRET=
- PUSHER_APP_CLUSTER=mt1
-
- MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
- MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"