Windows下Laravel环境搭建

升级Composer

1
2
C:\Users\yezhou>composer self-update
You are already using composer version 1.2.1 (stable channel).

升级Laravel安装器

1
2
3
4
5
6
7
8
9
10
C:\Users\yezhou>composer global update laravel/installer
Changed current directory to C:/Users/yezhou/AppData/Roaming/Composer
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Removing laravel/installer (v1.3.1)
- Installing laravel/installer (v1.3.4)
Downloading: 100%

Writing lock file
Generating autoload files

查看Laravel安装器版本号

1
2
C:\Users\yezhou>laravel --version
Laravel Installer version 1.3.3

创建Laravel项目

1
C:\Server\www>laravel new MyProject

创建指定版本Laravel项目

1
C:\Server\www>laravel new MyProject --5.2

或者使用composer的create-project安装

1
C:\Server\www>composer create-project laravel/laravel MyProject "5.1.*"

查看当前项目Laravel版本号

1
2
C:\Server\www\MyProject>php artisan -V
Laravel Framework version 5.3.22

Powered by AppBlog.CN     浙ICP备14037229号

Copyright © 2012 - 2020 APP开发技术博客 All Rights Reserved.

访客数 : | 访问量 :