1
1

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 1 year has passed since last update.

Laravelを初めて導入した

Last updated at Posted at 2021-01-17

Laravelを初めて使用して、導入に成功したのでアウトプットのために記事を投稿します。

まずは、PHPをインストールします。MacにはデフォルトでPHPが使用できるそうですが、Laravelをインストールする場合にはPHPもインストールします。

brew install php@7.4

今回は、Laravel6を使用します。
Laravel6はPHP7.2以降に対応しているため7.4をインストールします。

次にComposerをインストールします。
ComposerはPHPのパッケージを管理することができます。

brew install composer

その後、Laravelをインストール

composer global require "laravel/installer"

この後、laravelのコマンドを使用できるように設定します。(php artisan serve)など

その後、laravelのプロジェクトを起動してサーバーを立ち上げます。

composer create-project laravel/laravel プロジェクト名 --prefer-dist バージョン
php artisan serve

するとサーバーが立ち上がり、Laravelのトップページが表示されていれば成功です。

ちなみに「rails s]だとローカルホストのポート番号は3000でしたが、「php artisan serve」の場合は番号が8000になります。

以上、アウトプットのために投稿させていただきました。

初投稿でしたが、今後も少しずつ投稿していきたいと思いますので、宜しくお願いいたします。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?