Readouble

Laravel 5.2 インストール

インストールInstallation

サーバ要件Server Requirements

Laravelフレームワークを動作させるには多少のシステム要件があります。もちろん、Laravel Homestead仮想マシンでは、要求が全て満たされています。ですから、Laravelのローカル開発環境としてHomesteadを活用されることを強くおすすめします。The Laravel framework has a few system requirements. Of course, all of these requirements are satisfied by the Laravel Homestead[/docs/{{version}}/homestead] virtual machine, so it's highly recommended that you use Homestead as your local Laravel development environment.

しかし、Homesteadを使用しない場合は、以下の要件を満たす必要があります。However, if you are not using Homestead, you will need to make sure your server meets the following requirements:

- PHP >= 5.5.9 - OpenSSL PHP拡張 - PDO PHP拡張 - Mbstring PHP拡張 - Tokenizer PHP拡張

LaravelのインストールInstalling Laravel

LaravelはComposerを依存パッケージの管理に使用しています。ですから、Laravelを始める前に、自分の開発機にComposerを確実にインストールしておいてください。Laravel utilizes Composer[http://getcomposer.org] to manage its dependencies. So, before using Laravel, make sure you have Composer installed on your machine.

LaravelインストーラーVia Laravel Installer

最初にComposerを使用し、Laravelインストーラーをダウンロードします。First, download the Laravel installer using Composer:

composer global require "laravel/installer"

laravelコマンドが端末で実行できるように、~/.composer/vendor/binディレクトリ(もしくは、使用しているOSの同等のディレクトリ)へ実行PATHを通してください。Make sure to place the ~/.composer/vendor/bin directory (or the equivalent directory for your OS) in your PATH so the laravel executable can be located by your system.

インストールが完了したら、あとはlaravel newコマンドを実行するだけで、指定したディレクトリに真新しいLaravelプロジェクトが作成されます。たとえば、laravel new blogと打ち込めば、blogというディレクトリに、必要な依存パッケージと一緒に、Laravelがインストールされます。このインストール方法はComposerを使うよりも多少早いです。Once installed, the laravel new command will create a fresh Laravel installation in the directory you specify. For instance, laravel new blog will create a directory named blog containing a fresh Laravel installation with all of Laravel's dependencies already installed. This method of installation is much faster than installing via Composer:

laravel new blog

Composer Create-ProjectVia Composer Create-Project

もしくは、ターミナルでComposerのcreate-projectコマンドを実行して、Laravelをインストールすることもできます。Alternatively, you may also install Laravel by issuing the Composer create-project command in your terminal:

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

設定Configuration

フレームワークで使用する設定ファイルは全てconfigディレクトリ下に設置されます。それぞれのオプションはコメントされていますので、使用可能なオプションについて理解するために、ファイル全体に目を通しておくのが良いでしょう。All of the configuration files for the Laravel framework are stored in the config directory. Each option is documented, so feel free to look through the files and get familiar with the options available to you.

ディレクトリパーミッションDirectory Permissions

Laravelをインストールした後に、多少のパーミッションの設定が必要です。storage下とbootstrap/cacheディレクトリーをWebサーバーから書き込み可能にしてください。そうしないとLaravelは実行されないでしょう。Homestead仮想マシンを使用する場合は、あらかじめ設定されています。After installing Laravel, you may need to configure some permissions. Directories within the storage and the bootstrap/cache directories should be writable by your web server or Laravel will not run. If you are using the Homestead[/docs/{{version}}/homestead] virtual machine, these permissions should already be set.

アプリケーションキーApplication Key

次にインストール後に行うべきなのは、アプリケーションキーにランダムな文字列を設定することです。ComposerかLaravelインストーラを使ってインストールしていれば、php artisan key:generateコマンドにより既に設定済みです。通常、この文字列は32文字にすべきです。キーは.env環境ファイルに設定されます。もし、.env.exampleファイルをまだ.envにリネームしていなければ、今すぐ行ってください。アプリケーションキーが設定されていなければ、ユーザーセッションや他の暗号化済みデーターは安全ではありません!The next thing you should do after installing Laravel is set your application key to a random string. If you installed Laravel via Composer or the Laravel installer, this key has already been set for you by the php artisan key:generate command. Typically, this string should be 32 characters long. The key can be set in the .env environment file. If you have not renamed the .env.example file to .env, you should do that now. If the application key is not set, your user sessions and other encrypted data will not be secure!

その他の設定Additional Configuration

Laravelのその他の設定は、最初に指定する必要がありません。すぐに開発を開始しても大丈夫です! しかし、config/app.phpファイルと、その中の記述を確認しておいたほうが良いでしょう。アプリケーションに合わせ変更したい、timezonelocalのような多くのオプションが含まれています。Laravel needs almost no other configuration out of the box. You are free to get started developing! However, you may wish to review the config/app.php file and its documentation. It contains several options such as timezone and locale that you may wish to change according to your application.

以下のようなLaravelのコンポーネントについても、設定しておいたほうが良いでしょう。You may also want to configure a few additional components of Laravel, such as:

Laravelをインストールし終えたら、ローカル環境の設定も済ませてください。Once Laravel is installed, you should also configure your local environment[/docs/{{version}}/configuration#environment-configuration].

章選択

設定

明暗テーマ
light_mode
dark_mode
brightness_auto システム設定に合わせる
テーマ選択
photo_size_select_actual デフォルト
photo_size_select_actual モノクローム(白黒)
photo_size_select_actual Solarized風
photo_size_select_actual GitHub風(青ベース)
photo_size_select_actual Viva(黄緑ベース)
photo_size_select_actual Happy(紫ベース)
photo_size_select_actual Mint(緑ベース)
コードハイライトテーマ選択

明暗テーマごとに、コードハイライトのテーマを指定できます。

テーマ配色確認
スクリーン表示幅
640px
80%
90%
100%

768px以上の幅があるときのドキュメント部分表示幅です。

インデント
無し
1rem
2rem
3rem
原文確認
原文を全行表示
原文を一行ずつ表示
使用しない

※ 段落末のEボタンへカーソルオンで原文をPopupします。

Diff表示形式
色分けのみで区別
行頭の±で区別
削除線と追記で区別

※ [tl!…]形式の挿入削除行の表示形式です。

テストコード表示
両コード表示
Pestのみ表示
PHPUnitのみ表示
和文変換

対象文字列と置換文字列を半角スペースで区切ってください。(最大5組各10文字まで)

本文フォント

総称名以外はCSSと同様に、"〜"でエスケープしてください。

コードフォント

総称名以外はCSSと同様に、"〜"でエスケープしてください。

保存内容リセット

localStrageに保存してある設定項目をすべて削除し、デフォルト状態へ戻します。

ヘッダー項目移動

キーボード操作