Laravel framework learning and installation

Source: Internet
Author: User
Laravel framework learning and installation environment: mac OS 10.10.5; php 5.6.9;

Reference: http://www.golaravel.com/

Package management: python generally uses pip

Laravel uses Composer (Composer Chinese) to manage its dependent packages.

Installation:

lpe234@lpe234demacbookpro:/Users/lpe234  $ brew tap josegonzalez/homebrew-phpWarning: Already tapped!lpe234@lpe234demacbookpro:/Users/lpe234  $ brew install josegonzalez/php/composer==> Installing composer from josegonzalez/homebrew-php==> Downloading http://getcomposer.org/download/1.0.0-alpha10/composer.phar######################################################################## 100.0%==> CaveatsVerify your installation by running:  "composer --version".You can read more about composer and packagist by running:  "brew home composer".==> Summary?  /usr/local/Cellar/composer/1.0.0-alpha10: 3 files, 1.0M, built in 58 secondslpe234@lpe234demacbookpro:/Users/lpe234  $ composer --versionComposer version 1.0.0-alpha10 2015-04-14 21:18:51

Laravel framework installation

lpe234@lpe234demacbookpro:/Users/lpe234  $ composer global require "laravel/installer=~1.1"Changed current directory to /Users/lpe234/.composer./composer.json has been createdLoading composer repositories with package informationUpdating dependencies (including require-dev)  - Installing symfony/process (v2.7.6)    Downloading: 100%  - Installing symfony/console (v2.7.6)    Downloading: 100%  - Installing guzzlehttp/promises (1.0.3)    Downloading: 100%  - Installing psr/http-message (1.0)    Downloading: 100%  - Installing guzzlehttp/psr7 (1.2.1)    Downloading: 100%  - Installing guzzlehttp/guzzle (6.1.0)    Downloading: 100%  - Installing laravel/installer (v1.2.2)    Downloading: 100%symfony/console suggests installing symfony/event-dispatcher ()symfony/console suggests installing psr/log (For using the console logger)Writing lock fileGenerating autoload files

After the installation is complete, configure the environment variables.

export PATH=$PATH:~/.composer/vendor/bin

Then verify whether the request is successful. Restart terminal

lpe234@lpe234demacbookpro:/Users/lpe234  $ laravel --versionLaravel Installer version 1.2.2

Create a project

lpe234@lpe234demacbookpro:/Users/lpe234/PhpstormProjects  $ laravel new blogCrafting application...Generating optimized class loaderApplication key [NhGlYwNWoJkRSW4ElhLghXy2FtAlZmBI] set successfully.Application ready! Build something amazing.


Exception:

RuntimeExceptionin EncryptionServiceProvider. php line 29:

No supported encrypter found. The cipher and/or key length are invalid.


php artisan key:generate

Then, put the generated 32-bit key under config/app. php and APP_KEY in. env.

The php artisan serve error persists ~~~~~~~

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.