0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Macbookにcomposerとvaletをつかってlaravelをインストールする

Last updated at Posted at 2017-08-13

Macbookにcomposerとvaletをつかってlaravelをインストールする

いろいろ参考にralavelをインストールしたけど、ブラウザからどうもうまく表示できなかった。導入方法はたくさん出てくるので引っかかったところだけ記録しておくことにした。

目的

  • Macにlaravelのプロジェクトを作る
  • composerを使ってみたい
  • 調べてたらvaletというのが便利らしいので使ってみる

参考サイト

手順

↑のサイトの手順通りやれば導入できる

PHP7.*の導入とバージョンが一致しない

インストール後にPHPのバージョンを確認してみる。

php -v

PHP7.1.8 と表示されるはずが古いバージョンが表示されてしまった。

which php

本来つなぎたい場所は

/usr/local/bin/php

なので、 vim ~/.bashrc もしくは vim ~/.bash_profile

export PATH=$(brew --prefix)/bin:$PATH

を追記して、もう一度

which php

ただしいpathがとおったところで、

php -v

PHP7.1.8がインストールされていることが確認できた。

### プロジェクト作成後に【プロジェクト名】.devでブラウザから確認できない

composerでインストールしたせい(?)かブラウザから確認できなかった。

cd /プロジェクトまでのpath/
php artisan serve

で、localhost:8000でアクセスすると繋がった。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?