1.将文件放入wamp的www里面,运行启动wamp
2.cmd到文件根目录,composer install
3.配置 .env,修改database.php
APP_ENV=local APP_DEBUG=true APP_KEY=base64:aOvcNcKoq8387lx7kHYurR4Fr7wrZNDUfy90Y5gaE8E= APP_URL=http://localhost DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=testlaravel DB_USERNAME=root DB_PASSWORD=null CACHE_DRIVER=file SESSION_DRIVER=file QUEUE_DRIVER=sync REDIS_HOST=127.0.0.1 REDIS_PASSWORD=null REDIS_PORT=6379 MAIL_DRIVER=smtp MAIL_HOST=mailtrap.io MAIL_PORT=2525 MAIL_USERNAME=null MAIL_PASSWORD=null MAIL_ENCRYPTION=null
4.cmd到文件根目录,php artisan migrate 生成数据表
5.cmd到文件根目录,php artisan serve 启动laravel
时间: 2024-10-26 12:36:11