>php教程 >php手册 >laravel 初识,laravel

laravel 初识,laravel

WBOY
WBOY원래의
2016-06-13 09:16:15947검색

laravel 初识,laravel

最近看到网上说laravel 是php最火的一个框架,今天抽出时间先搞一搞。

 

首先安装composer

安装composer  php-<span>amqplib的依赖环境   
curl </span>-sS https:<span>//</span><span>getcomposer.org/installer | php</span>
mv composer.phar /usr/local/bin/composer

这个是以前安装的今天提示需要更新错误如下

Warning: This development build of composer is over 30 days old. It is recommended to update it by running "/usr/local/bin/composer self-update" to get the latest version.<span>

执行更新
$ </span>/usr/local/bin/composer self-update

随后通过 Composer 下载 Laravel 安装器

$ composer <span>global</span> <span>require</span> "laravel/installer=~1.1"

请确保把 ~/.composer/vendor/bin 路径添加到 PATH 环境变量里, 这样laravel 可执行文件才能被命令行找到, 以后您就可以在命令行下直接使用 laravel 命令.

安装成功后, 可以使用命令 laravel new 在您指定的目录下创建一份全新安装的 Laravel。例如,laravel new blog 将会在当前目录下创建一个叫 blog 的目录, 此目录里面存放着全新安装的 Laravel 以及其依赖的工具包。这种安装方法比通过 Composer 安装要快许多

 创建项目

$ laravel <span>new</span> laravelTest

 

http://v4.golaravel.com/docs/4.2/installation

성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.