2017-02-01から1ヶ月間の記事一覧
メンテナンスモードの使い方 開始 $ php artisan down 復帰 Be right back.と表示される php artisan up メンテナンスモードの仕組み storage/framework/down が存在していたらメンテナンスモードになっている $ ls -la storage/framework/down ls: cannot a…
DotEnvライブラリ https://github.com/vlucas/phpdotenv 設定ファイル .env: 各環境で使う設定ファイル git管理対象外 .env.example: サンプルファイル git管理対象 $ diff .env.example .env 2c2 < APP_KEY= --- > APP_KEY=base64key... 設定の適用 設定フ…
if @if (count($people)) @endif foreach @foreach ($people as $person) {{ $person }} @endforeach Template テンプレート側: @yield('bar') テンプレート利用側: Fooテンプレートの継承: @extends('foo') セクション書き換え: @section('bar'), @stop テ…
Summary テンプレートはBladeファイル: foo.blade.php withを使ってControllerからViewへ渡す Controller側: view('pages.about')->with('name', $name) View側: エスケープ: {{$bar}} 非エスケープ: {!! $bar !!} How to basic app/Http/routes.php Route::…
What? ざっくり最小のRouting, Controller, Viewの流れを確認する Why? ざっくり最小のものを作りたい Routing routes/: ルーティングディレクトリ ver 5.3 から app/Http/routes.php は廃止 $ less routes/ api.php channels.php console.php web.php Route…
Why? いっつもyum使ってるけど、Ubuntu使ったときにapt-get使ったけど、違いが説明しきれなかった 同じところ apt も yum もパッケージ管理ソフト 自動ダウンロード、インストール、アップグレード 違うところ apt debパッケージを呼び出す Debian系Linuxで…
What? Ubuntu に Java環境をインストールする Why? NeobundleInstall を叩いたときにJavaがなくてコケた Solution Apt-get でインストールする Ubuntu version $ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=16.04 DISTRIB_CODENAME=xenial DIS…
What? ホストPC上では、以下で止まってエラー無しでタイムアウトする $ vagrant up Bringing machine 'homestead-7' up with 'virtualbox' provider... ==> homestead-7: Checking if box 'laravel/homestead' is up to date... ==> homestead-7: Clearing a…
Index What? Why? How to? Step1: 事前準備 Step2: 設定 Step3: VM立ち上げ Step4: Laravelインストール 参考 What? Laravel のローカル開発環境をHomestead Vagrant boxで簡単にセットアップする方法 ざっくりした構成 Laravel: PHPフレームワーク Homestea…
What? Laravel homestead初期設定中に失敗したときのやり直し方 Why? IPの設定を間違えてvagrant up中にタイムアウトし、そのままvagrant upしようとしたら立ち上げれなかった $ vagrant up Bringing machine 'homestead-7' up with 'virtualbox' provider..…
What? Mac で vagrant のバージョンアップをする Why? Laravel環境をhomesteadで作ろうとしたらバージョン低すぎて怒られた $ vagrant up This Vagrant environment has specified that it requires the Vagrant version to satisfy the following version r…
What? Jenkins初期セットアップ時に以下エラーが表示され、プラグインがインストールできない。 An error occurred during installation: No such plugin: cloudbees-folder Why? まだ不明 Solution? http://localhost:8080/restart でJenkinsを再起動する o…