{"id":887,"date":"2023-05-17T14:10:50","date_gmt":"2023-05-17T05:10:50","guid":{"rendered":"https:\/\/shinke1987.net\/?p=887"},"modified":"2023-09-17T15:25:45","modified_gmt":"2023-09-17T06:25:45","slug":"laravel%e3%81%ae-env%e3%83%95%e3%82%a1%e3%82%a4%e3%83%ab%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6","status":"publish","type":"post","link":"https:\/\/shinke1987.net\/?p=887","title":{"rendered":"Laravel\u306e.env\u30d5\u30a1\u30a4\u30eb\u306b\u3064\u3044\u3066"},"content":{"rendered":"\n<h2 id=\"toc0\" class=\"wp-block-heading\">\u6982\u8981<\/h2>\n\n\n\n<p>\u958b\u767a\u74b0\u5883\u7528\u3068\u672c\u756a\u74b0\u5883\u7528\u306e2\u3064\u306e.env\u30d5\u30a1\u30a4\u30eb\u3092\u6e96\u5099\u3057\u3066\u304a\u304f\u3068\u3001<br>\u5207\u308a\u66ff\u3048\u308b\u3060\u3051\u3067\u8a2d\u5b9a\u3092\u5909\u66f4\u3067\u304d\u308b\u3002<\/p>\n\n\n\n<h2 id=\"toc1\" class=\"wp-block-heading\">.env\u30d5\u30a1\u30a4\u30eb\u306e\u74b0\u5883\u5909\u6570<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><span class=\"bold\"><center>\u74b0\u5883\u5909\u6570<\/center><\/span><\/td><td><span class=\"bold\"><center>\u610f\u5473<\/center><\/span><\/td><td><span class=\"bold\"><center>\u958b\u767a\u74b0\u5883\u3067\u306e\u5024<\/center><\/span><\/td><td><span class=\"bold\"><center>\u672c\u756a\u74b0\u5883\u3067\u306e\u5024<\/center><\/span><\/td><\/tr><tr><td>APP_NAME<\/td><td>Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u540d\u524d\u3002<\/td><td>Laravel<\/td><td>\u9069\u5207\u306a\u540d\u524d<\/td><\/tr><tr><td>APP_ENV<\/td><td>Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u5b9f\u884c\u74b0\u5883\u3002<\/td><td>local<\/td><td>production<\/td><\/tr><tr><td>APP_KEY<\/td><td>\u6697\u53f7\u5316\u306b\u4f7f\u3046\u9375<\/td><td>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u4f5c\u6210\u6642\u306b\u81ea\u52d5\u751f\u6210\u3002<\/td><td>\u958b\u767a\u74b0\u5883\u3068\u540c\u3058\u5024\u3002<\/td><\/tr><tr><td>APP_DEBUG<\/td><td>\u30c7\u30d0\u30c3\u30b0\u60c5\u5831\u3092Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u4e0a\u306b\u8868\u793a\u3002<\/td><td>true<\/td><td>false<\/td><\/tr><tr><td>APP_URL<\/td><td>Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306eURL<\/td><td><a href=\"http:\/\/localhost\/\">http:\/\/localhost\/<\/a><\/td><td>\u672c\u756a\u74b0\u5883\u306eURL<\/td><\/tr><tr><td>DB_USERNAME<\/td><td>DB\u3078\u30a2\u30af\u30bb\u30b9\u3059\u308b\u6642\u306e\u30e6\u30fc\u30b6\u540d<\/td><td>sail<\/td><td>\u9069\u5b9c\u5909\u66f4<\/td><\/tr><tr><td>DB_PASSWORD<\/td><td>DB\u3078\u30a2\u30af\u30bb\u30b9\u3059\u308b\u6642\u306e\u30d1\u30b9\u30ef\u30fc\u30c9<\/td><td>password<\/td><td>\u9069\u5b9c\u5909\u66f4<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 id=\"toc2\" class=\"wp-block-heading\">.env\u30d5\u30a1\u30a4\u30eb\u5185\u306e\u74b0\u5883\u5909\u6570\u306e\u4f7f\u308f\u308c\u65b9\u3092\u78ba\u8a8d<\/h2>\n\n\n\n<h3 id=\"toc3\" class=\"wp-block-heading\">config\/app.php\u306e\u5834\u5408\uff08APP_NAME\uff09<\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\n&#039;name&#039; =&gt; env(&#039;APP_NAME&#039;, &#039;Laravel&#039;),\n<\/pre><\/div>\n\n\n<p>\u3068\u8a18\u8f09\u304c\u3042\u308a\u3001<br>.env\u30d5\u30a1\u30a4\u30eb\u306b\u3066APP_NAME\u306e\u8a2d\u5b9a\u304c\u3055\u308c\u3066\u3044\u308c\u3070\u3001\u8a2d\u5b9a\u3055\u308c\u305f\u6587\u5b57\u5217\u304c\u9069\u7528\u3055\u308c\u308b\u304c\u3001<br>\u8a2d\u5b9a\u3055\u308c\u305f\u6587\u5b57\u5217\u304c\u7121\u3051\u308c\u3070&#8217;Laravel&#8217;\u3068\u3044\u3046\u6587\u5b57\u5217\u304c\u8a2d\u5b9a\u3055\u308c\u308b\u3053\u3068\u306b\u306a\u308b\u3002<\/p>\n\n\n\n<h3 id=\"toc4\" class=\"wp-block-heading\">\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u5185\u304b\u3089APP_NAME\u3092\u8aad\u307f\u8fbc\u3080\u5834\u5408<\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\n$value = config(&#039;app.name&#039;);\n<\/pre><\/div>","protected":false},"excerpt":{"rendered":"<p>\u6982\u8981 \u958b\u767a\u74b0\u5883\u7528\u3068\u672c\u756a\u74b0\u5883\u7528\u306e2\u3064\u306e.env\u30d5\u30a1\u30a4\u30eb\u3092\u6e96\u5099\u3057\u3066\u304a\u304f\u3068\u3001\u5207\u308a\u66ff\u3048\u308b\u3060\u3051\u3067\u8a2d\u5b9a\u3092\u5909\u66f4\u3067\u304d\u308b\u3002 .env\u30d5\u30a1\u30a4\u30eb\u306e\u74b0\u5883\u5909\u6570 \u74b0\u5883\u5909\u6570 \u610f\u5473 \u958b\u767a\u74b0\u5883\u3067\u306e\u5024 \u672c\u756a\u74b0\u5883\u3067\u306e\u5024 APP_NAME Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[96,80],"tags":[88,81],"class_list":["post-887","post","type-post","status-publish","format-standard","hentry","category-laravel","category-php","tag-laravel","tag-php"],"_links":{"self":[{"href":"https:\/\/shinke1987.net\/index.php?rest_route=\/wp\/v2\/posts\/887","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/shinke1987.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/shinke1987.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/shinke1987.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/shinke1987.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=887"}],"version-history":[{"count":1,"href":"https:\/\/shinke1987.net\/index.php?rest_route=\/wp\/v2\/posts\/887\/revisions"}],"predecessor-version":[{"id":888,"href":"https:\/\/shinke1987.net\/index.php?rest_route=\/wp\/v2\/posts\/887\/revisions\/888"}],"wp:attachment":[{"href":"https:\/\/shinke1987.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=887"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/shinke1987.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=887"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/shinke1987.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=887"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}