You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
I am looping over all comments posted by the Author of a particular post. foreach($post->user->comments as $comment) { echo "<li>" . $comment->title . " (" . $comment->post->id . ")</li>"; } This gives me I love this post (3) This is a comment (5) This is the second Comment (3) How would I order by the post_id so that the above list is ordered as 3,3,5
Laravelのバージョンが5になってから、グローバルスコープを持つ変数の設定は、.envとconfig/のディレクトリの設定ファイルで、実用的しかも綺麗にまとまりました。変数の使用も、config('app.url')と、プログラムのでどこでも簡単に取得できます。 また、DBの設定などのデフォルト設定ファイル以外にも、独自の設定ファイルも作成できます。 例えば、 config/local.phpというファイルを作成して、 return [ 'convert' => '/usr/bin/convert', // 画像変換のプログラムのパス名 'items_per_page' => 50, // 1ページのアイテム数 'max_upload_size' => 20, // 最大アップロードの画像サイズ(MB) 'company' => env('LOCAL_COMPANY', 'Lots o
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く