Laravel is a simple, elegant PHP Web development Framework (PHP Web framework). In the world (excluding China) The PHP framework has a share of more than 40%.
Yii has been used since the contact with PHP, and it is a good framework to feel that the YII implementation function is relatively simple. Recently, because of the cause of work began to study Laravel5, I have to say that I installed in the first step is a pit, the following is my painful learning results. Laravel for me is completely new things, if the content is wrong, please leave a message or QQ me, help me correct the mistake, grateful!!!
1. First install PHP, preferably more than 5.6 version
(1) You need to specify the path of Php.exe during Windows installation composer
(2) The Linux installation composer process needs to use the PHP-CLI function
2. Installing composer
(1) Windows installation composer
A.windows Download composer Software, then next until finished
B.win+r = input cmd = input composer If a composer font appears indicating successful installation
(2) Linux installation composer
a.$ Curl-ss Https://getcomposer.org/installer | Php
B. Composer.phar this file should be produced at this time under ~/.composer
c.$ MV Composer.phar/usr/local/bin/composer
D. Move the Composer.phar to/usr/local/bin/composer Global, you can use the composer in the future without the need for PHP Composer.phar
e.$ composer
3. Modify the composer Image source (recommended first)
(1) Add configuration information to composer configuration file Config.json (System global Configuration)
$composer config-g repositories.packagist composer http://packagist.phpcomposer.com
(2) Adding configuration information to a single project's Composer.json file (single item configuration)
Note the last few lines repositories
{Name ":" Laravel/laravel "," description ":" The Laravel framework. "," keywords ": [" Framework "," Laravel "]," license ": "MIT", "type": "Project", "require": {"PHP": ">= ...", "Laravel/framework": ". * "}," Require-dev ": {" Fzaninotto/faker ":" ~. "," Mockery/mockery ":". * "," Phpunit/phpunit ":" ~. "," Phpspec/phpspec ":" ~. " }, "AutoLoad": {"Classmap": ["Database"], "psr-": {"app\\": "App/"}}, "Autoload-dev": { "Classmap": ["tests/testcase.php"]}, "scripts": {"Post-install-cmd": ["PHP Artisan clear-compiled", "PHP artisan Optimize"], "pre-update-cmd": ["PHP artisan clear-compiled"], "post-update-cmd": [ "PHP artisan Optimize"], "Post-root-package-install": ["php-r \" Copy ('. Env.example ', '. env '); \ ""], "Post-create-project-cmd": ["PHP Artisan Key:generate"]}, "config": {"Preferred-install": "Dist"}, "Repositories": [{"Type": "composer"," url ":" Http://packagist.phpcomposer.com "}, {" Packagist ": false}]}
4. Installing Laravel
$ composer Create-project Laravel/laravel Learnlaravel5
Browser Access Localhost/learnlaravel5/public, Laravel5 indicates LARAVEL5 installation succeeded
The above content is small to everyone to share the PHP framework Laravel learning experience, this article is not good, also please give me a hero to put forward valuable advice, common learning progress.