LoginSignup
7
7

More than 5 years have passed since last update.

MacにLaravelをインストールしてみた

Last updated at Posted at 2018-07-03

Laravelをローカルサーバーで開くところまで。

環境

MacOS 10.13.5(High Sierra)。
brewインストール済み。

この時の環境は最終的に以下のようになった。
PHP 7.1.16
Laravel 5.6.26

コマンド

# PHPをインストール
brew install php
php -v
# Composerをインストール
brew install composer
composer -V
# Laravelをインストール
composer global require "laravel/installer"
# 環境変数を設定
echo export PATH=\"$HOME/.composer/vendor/bin:\$PATH\" >> ~/.bash_profile
# 環境変数を読み込み
source ~/.bash_profile
php artisan -V
# テンプレートを生成
laravel new blog
# ディレクトリ移動
cd blog/
# ローカルサーバーを起動
php artisan serve
# ブラウザで開く
open http://localhost:8000/

するとこんな画面が表示される。完了 :tada:
スクリーンショット 2018-07-03 20.48.57.png

参考

7
7
1

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
7
7