Home > php教程 > php手册 > body text

laravel 初识,laravel

WBOY
Release: 2016-06-13 09:16:15
Original
918 people have browsed it

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
Copy after login

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

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
Copy after login

随后通过 Composer 下载 Laravel 安装器

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

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

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

创建项目

$ laravel <span>new</span> laravelTest
Copy after login

 

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

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template