Home >Backend Development >PHP Tutorial >Laravel first experience

Laravel first experience

WBOY
WBOYOriginal
2016-07-25 08:43:49967browse

Official document address: http://www.golaravel.com/docs/4.1/introduction/

System environment Mac OSX 10.9.2

Upgrade php
  1. brew update
  2. brew upgrade
  3. brew tap homebrew/dupes
  4. brew tap josegonzalez/homebrew-php
  5. brew install php55
Copy code
Install composer
  1. https://getcomposer.org/doc/00-intro.md#globally-on-osx-via-homebrew-
Copy code
Install php55-mcrypt

(Access the routing address after startup, if prompted Mcrypt PHP extension required)

  1. 1.Mac brew install php55-mcrypt
  2. 2.XAMPP I didn’t encounter that prompt, everything is normal. php -i | grep mcrypt is shown as enabled
Copy code
Configure php.ini
  1. extension=php_openssl.dll
Copy code
Create a new project
  1. composer create-project laravel/laravel demo
Copy code
Configure /etc/hostsPersonal preference)
  1. 127.0.0.1 localhost
  2. 127.0.0.1 laravel.dev
Copy code
Configuration /Applications/XAMPP/xamppfiles/etc/extra/httpd-vhosts.conf
  1. ServerAdmin qbylucky@gmail.com
  2. DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs/demo/public"
  3. ServerName laravel.dev
  4. ServerAlias ​​laravel.dev
  5. ErrorLog "logs/qbyluck y @gmail.com-error_log"
  6. CustomLog "logs/qbylucky@gmail.com-access_log" common
Copy code
Startup project

Enable XAMPP apache server
http://laravel.dev/

Knowledge points
  1. php location:
  2. 1.Mac /usr/bin/php
  3. 2.XAMPP /Applications/XAMPP/xamppfiles/bin/php
  4. php.ini location:
  5. 1.Mac /etc/php.ini
  6. 2.
  7. Laravel
Statement:
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