These instructions require that you have git installed.
Installation
- Clone the laravel framework repository. This contains a basic layout for an application, although composer will be required to install all the dependencies.
git clone https://github.com/laravel/laravel.git - Rename the directory to one more suited for your project
mv laravel/ [project] - Change the permissions and owner of your project
chown -R [user]:[group] [project] - Go into your project directory
cd [project] - Download a copy of composer for your project
curl -sS https://getcomposer.org/installer | php - Since composer will now handle all dependancies, we no longer need git to mirror the laravel repository. Remove it:
git remote -vgit remote rm origin
If you wish to keep the repository around, you should just rename it:
git remote rename origin laravel - Edit your composer dependencies, which are stored in composer.json. If nothing else, edit the name, description, keywords, and license fields to suit your project.
- Ensure your composer.json is valid by running:
php composer.phar validate - Install all dependancies via composer
php composer.phar install - Run the in-built PHP development server to check that everything is working correctly
php artisan server
You should now be able to view your new application through http://localhost:8000/. Use the --help flag to see more configuration options. - If you make changes to your composer dependancies, just run:
php composer.phar update
Netbeans and Laravel set-up
- Follow the above instructions to create a new instance of Laravel
- Start a new project by clicking on File -> New Project
- Select PHP -> PHP Application with existing sources
- Select the sources folder as the project directory you created earlier
- Set the 'Run As' configuration as PHP Built-in Web Server with the router script set to public/index.php. Note that other files (such as css and js files) stored in the public directory will not be served.
Eclipse and Laravel set-up
- Ensure you have installed the PHP development extensions
- Select File -> New Project -> Project
- Select PHP -> PHP Project
- Enter in a project name and choose the existing source folder. You can finish the settings now, or configure the project further.
- I could not get the Eclipse PHP server to work, so you will have to figure that one our for yourself.
Composer overview
- The command php composer.phar will list all the available commands in composer
- The composer.json file will list dependencies and configuration defaults for the composer binary.
- The composer.lock file is generated after you run the install or update composer command. This file will store the exact version downloaded and any local configuration.
you can install laravel by three method,
ReplyDeletecomposer,
clone the git
user laravel.phar file.
http://kvcodes.com/2014/04/install-laravel-using-laravel-phar-file/
read for more informations.