Help us understand the problem. What is going on with this article?

laravelでバージョンを指定してインストール

More than 1 year has passed since last update.

composerでバージョン指定インストール

composer create-project "laravel/laravel=5.1.*" sampleproject

インストールはこれでok
バージョンを確認してみます。

php artisan -V                                                                                                                                          
Laravel Framework version 5.2.45

laravelを動かしてみる

cp .env_example .env

.envファイル編集

APP_ENV=local
APP_DEBUG=true
APP_KEY=base64:P5PzQdhxogdBoXjQLPuXndyfKHGMQY4K9pWZqhpSKzk=
APP_URL=http://localhost

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
# ここを作成したDBに書き換える
DB_DATABASE=homestead
# ユーザ名を書き換える
DB_USERNAME=homestead
# パスワードを変更
DB_PASSWORD=secret

CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null

app keyを作成します。

php artisan key:generate

実際に動いているか確認してみます。

php artisan serve

これでつながると思います。

参考文献

Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away