①MAMPのhtdocsにディレクトリ移動
ターミナルを開き、下記コマンドを入力。
$ cd /Applications/MAMP/htdocs
②Laravelプロジェクト作成
htdocs配下において、下記コマンドを入力。
公文)
$ composer create-project laravel/laravel プロジェクト名 --prefer-dist "6.0.*"
例)
$ composer create-project laravel/laravel laravel_test --prefer-dist "6.0.*"
③対象プロジェクトのディレクトリに移動
htdocs配下において、下記コマンドを入力。
公文)
$ cd プロジェクト名
例)
$ cd laravel_test
④サーバ起動
③で作成したディレクトリ配下において、下記コマンドを入力。
$ php artisan serve
⑤サーバ起動確認
ブラウザを開き、下記にアクセス。
http://127.0.0.1:8000
⑥サーバ停止
「control」 + 「c」 を同時に押下