2
4

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.

XAMPP環境にLaravelを導入する

Posted at

はじめに

前回の記事(WindowsにPHPの環境を作る(XAMPPのインストール))にてPHPの環境としてXAMPPをインストールしました。
フレームワークを使ってみたいと思い、Laravelの環境を作りました。

環境

・OS:Windows 10 home
・PHP:7.3.2
インストールしたもの
・Laravel:5.8.3

Composer

Composerというものをインストールします。
これはパッケージ管理システムで、ファイルの依存関係も考慮していろいろダウンロードしてくれるものらしいです。

以下のリンク先からComposerをダウンロードします。
Composer

Downloadを押します。
1.png

Composer-Setup.exeを押します。
2.png

ダウンロードしたインストーラを起動します。
3.png

php.exeを選択します。
4.png

後は特に設定を変えずにNextを押して進みます。
以下の画面で終了です。
8.png

プロジェクトの作成(Laravelのインストール)

コマンドプロンプト等を起動し、xampp配下のhtdocsにカレントディレクトリを移動します。
1-2.png
以下のコマンドを実行します。(「sample」の部分は任意のプロジェクト名です。)

 composer create-project --prefer-dist laravel/laravel sample

以下のように、「Application key set successfully.」と出て終了します。
3-2.png

実行

前回と同様にサーバーを起動します。
x3.png
以下のアドレスにアクセスします。

 http://localhost/sample/public

以下のページが表示されると成功です。
l1.png

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?