First acquaintance with laravel

WBOY
Release: 2016-08-08 09:30:32
Original
985 people have browsed it

I recently saw on the Internet that laravel is the most popular framework for PHP, so I took the time to try it out today.

First install 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

This was installed before. Today it prompts that it needs to be updated. The error is as follows

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

Then download the Laravel installer through Composer

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

Please make sure to add the ~/.composer/vendor/bin path to the PATH environment variable so that the laravel executable file can be found by the command line. In the future, you can use the laravel command directly from the command line.

After successful installation, you can use the command laravel new to create a new installation of Laravel in the directory you specify. For example, laravel new blog will create a directory called blog in the current directory, which stores the newly installed Laravel and its dependent tool packages. This installation method is much faster than installing through Composer

Create project

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

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

The above is an introduction to laravel, including some aspects. I hope it will be helpful to friends who are interested in PHP tutorials.

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 Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template