当前位置: 动力学知识库 > 问答 > 编程问答 >

php - Installing Laravel

问题描述:

I am on a windows 8 machine and I'm trying to learn laravel. I copy and pasted my PHP folder from C:\xampp to C:\php, installed composer, ran composer install then composer create-project laravel/laravel learning-laravel. So far everything was created so I went into the directory and tried to use 'php artisan serve' and got the following error.

C:\Users\denni_000\learning-laravel>php artisan serve

Warning: require(C:\Users\denni_000\learning-laravel\bootstrap/../vendor/autoloa

d.php): failed to open stream: No such file or directory in C:\Users\denni_000\l

earning-laravel\bootstrap\autoload.php on line 17

网友答案:

Why you copied php folder

  1. download composer install it.
  2. download laravel latest version and store it on your xampp/htdocs/laravel
  3. and run cmd with composer install command

For more follow install laravel on windows xampp

or Laravel 4.1 installation with composer in xampp

网友答案:

For windows Simply download Laragon which includes latest php 5.6.7, Apache, Mysql, Redis, Memcached an alternative to Xampp or Mamp with small size. Easy to install laravel and create project with auto create virtual host by it. Thank you.

网友答案:

U need to go to the directory where laravel is installed and run the following command.

composer update
网友答案:

Install Laravel 4.2 with composer:

sudo composer.phar create-project laravel/laravel project-directory-name 4.2 --prefer-dist
网友答案:

Here is a different way to setup laravel, may be you guys will like it

Step 1: Clone https://github.com/laravel/laravel or you may download zip also.

Step 2: Navigate to downloaded folder in command prompt and run composer install

Step 3: open the folder and rename .env.example to .env and update the credentials mentioned in file.

Step 4: After these steps if you navigate to the directory from web-server it will cause an error No supported encrypter found. The cipher and / or key length are invalid. to fix this just run php artisan key:generate

Done!

Hope you guys like this way :)

网友答案:

You need to install all the laravel required dependency.

To do that, you need to tell composer to install everything needed.

Below is the command to use to install that's required in laravel composer.json.

composer install
网友答案:

Follow the installation guide from Laravel

  1. Install Composer:

    Like Laravel.com says: "Make sure to place the ~/.composer/vendor/bin directory in your PATH so the laravel executable can be located by your system."

  2. Type the following statement in the command line:

    composer global require "laravel/installer=~1.1"
    
  3. Create a fresh Laravel project in a specified directory with the "laravel new" command:

    laravel new blog
    

    You can also create a Laravel project using composer, like such:

    composer create-project laravel/laravel --prefer-dist
    
网友答案:

If you want to learn laravel I seriously recommend you use laravel homestead with vagrant.

For this you need to:

  1. Install virtualbox.
  2. Install vagrant.
  3. Install git.
  4. Install ssh.exe (Download msysgit and copy the content of bin folder to git bin folder).
  5. Install Homestead on Vagrant (Follow the steps on laravel/homestead documentation page).
  6. Install Laravel on Homestead (Follow the steps on laravel/installation documentation page).

This method apply to Windows, Linux or Mac, only change the step 4 on linux or mac.

分享给朋友:
您可能感兴趣的文章:
随机阅读: