PHP background Development (ii) LARAVEL framework

Source: Internet
Author: User
Tags mcrypt

PHP background Development (ii) LARAVEL framework

In order to improve the background development efficiency, often need to choose a set of suitable for their own development framework, therefore, chose a more functional laravel framework, carefully learned, feel and Python language framework Django very similar.

Laravel Frame

Laravel is a Web application development framework that has an expressive and concise syntax and provides tools or features that are often used in development processes such as validation (authentication), routing (routing), Session, and caching (caching).

Frame Mount installation composerhttp://docs.phpcomposer.com/download/
Curl-ss https://Getcomposer.org/installer | php

MV Composer.phar/usr/bin/composer

Because of the foreign scene is not stable, so connected to the domestic scene, the specific method reference: http://pkg.phpcomposer.com/. (Select a configuration method for method 1)

Installing Laravel

Install Lavarel via composer.

" laravel/installer=~1.1 "

~/.composer/vendor/binAdd the paths to the PATH environment variable so that the laravel executable file can be found by the command line.

Ln -S ~/.composer/vendor/bin/laravel/usr/local/bin/laravel
Create a new project installation dependent library

Install start MCrypt PHP Extension

sudo Install php5-mcryptsudo php5enmod mcrypt
Starting the Mod_rewrite module

The usual situation is to modify the level two route, there will be 404 cases, the workaround is to start the module.

sudo a2enmod rewrite
Laravel Installer Installation
Laravel New Demo
Composer create-project Command Installation
Composer Create-project Laravel/laravel Project_Name
Free Installation Download Complete project

Click on the link below to download the file, version 4.2

Http://files.cnblogs.com/files/coder2012/complete-laravel4-master.zip

Configuring Apache with Laravel

Modifying a configuration file apache2.conf

vim/etc/apache2/apache2.conf Modify and add content:<directory/>    Options followsymlinks    AllowOverride     all </Directory><Directory/opt/work/laravel/public>    Options Indexes FollowSymLinks    allowoverride All     Require all granted</Directory>

Modifying a configuration file 000-default.conf

vim/etc/apache2/sites-available/-/opt/work/laravel/public

Restart Apache

/etc/init.d/apache2 restart

Access http://localhost/, if seen as a tablet, indicates success.

PHP background Development (ii) LARAVEL framework

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.