環境
Mac Catalina10.15
Homebrewをインストールする
Homebrewはソフトウェアの導入を単純化するパッケージ管理システムのひとつです
以下コマンドを実行
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
インストールできたか確認
$ brew -v
PHPをインストールする
以下のコマンドでphp7.4をインストールする
$ brew install php@7.4
インストールできたか確認
$ php -v
Composerをインストールする
Composerとは、PHP向けのパッケージ管理システムです
Homebrewでインストールする
$ brew install composer
インストールできたか確認
$ composer -V
Laravelのインストール
Composerを用いてLaravelをインストールします
方法は2通りあります。
方法1
#Laravelインストール&プロジェクト作成
$ composer create-project laravel/laravel --prefer-dist プロジェクト名
方法2
#Laravelインストール
$ composer global require "laravel/installer"
#プロジェクト作成
$ laravel new プロジェクト名
laravelのバージョン確認
$ php artisan -V
デバッガーのインストール
$ composer require barryvdh/laravel-debugbar