Laravel5のVagrantFile
Laravel5 + Vagrant
いつの間にかLaravel5になってた
- Laravel4の勉強をしようと思っていたらいつのまにか。。
前提条件
環境準備 Laravelから専用のbox が出ているので利用する Homesteadとか言うらしい
Laravel - The PHP Framework For Web Artisans
- box追加
vagrant box add laravel/homestead
- Homesteadファイル群取得
git clone https://github.com/laravel/homestead.git Homestead
- init
cd Homestead bash init.sh
- composer関連 (何?)
composer global require "laravel/homestead=~2.0"
- Homestead のyamlファイル生成
homestead init ~/.Homestead/Homestead.yamlが作られる
- 設定ファイル編集
homestead edit
editor が上がるので、IPとかPathとか変更 ※path は folders : mapの部分をlocalのsync させたいDirectoryに書き換える
http://laravel.io/forum/11-25-2014-homestead-404-not-found
- VM起動 Homestead Directory内で(VagrantFileがあるはず)
vagrant up
- hostsに追記 (hosterに追加した)
192.168.10.10 homestead.app (yamlに指定したIP)
アクセス http://homestead.app
No input file specified.とか言われる 気がついたらproject をcreate してないよ Documentになぜかない
VMにsshする http://stackoverflow.com/questions/24274387/using-laravel-homestead-no-input-file-specified
vagrant ssh -- ubuntuにlogin -- cd Code sudo composer self-update composer create-project laravel/laravel Laravel --prefer-dist
- 再度アクセス Simplicity is an acquired taste. - Katharine Gerould
仕事の区切りがついたから少し環境作ってみた。