{"id":854,"date":"2019-05-20T09:47:14","date_gmt":"2019-05-20T00:47:14","guid":{"rendered":"https:\/\/dennie.tokyo\/it\/?p=854"},"modified":"2022-04-07T18:46:18","modified_gmt":"2022-04-07T09:46:18","slug":"%e3%82%b3%e3%83%b3%e3%83%88%e3%83%ad%e3%83%bc%e3%83%a9%e3%83%bc-%e5%9f%ba%e6%9c%ac-laravel5-8","status":"publish","type":"post","link":"https:\/\/dennie.tokyo\/it\/?p=854","title":{"rendered":"\u3010Laravel\u3011\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc \u57fa\u672c"},"content":{"rendered":"\n<p>\u524d\u56de\u306f\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u304b\u3089\u30d3\u30e5\u30fc\u3092\u8868\u793a\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>\u4eca\u56de\u306f\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u304b\u3089\u30d3\u30e5\u30fc\u3092\u8868\u793a\u3057\u307e\u3059\u3002<br>\u4eca\u56de\u3082\u5b9f\u8df5\u304b\u3089\u7406\u89e3\u3092\u6df1\u3081\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<div class=\"title_box\"><span class=\"box-title\">\u524d\u56de<\/span>\n<p><a href=\"https:\/\/dennie.tokyo\/it\/?p=695\" rel=\"noopener noreferrer\" target=\"_blank\">\u3010Laravel\u3011View \u753b\u9762\u8868\u793a\u8d85\u5165\u9580<\/a><\/p>\n<\/div>\n\n\n\n<h1 class=\"wp-block-heading\">\u524d\u63d0<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">\u30d5\u30a1\u30a4\u30eb\u69cb\u6210<\/h2>\n\n\n\n<p>\u4eca\u56de\u4f7f\u7528\u3059\u308b\u30d5\u30a1\u30a4\u30eb\u306e\u69cb\u6210\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th scope=\"col\">\u30d5\u30a1\u30a4\u30eb\u540d<\/th><th scope=\"col\">\u8aac\u660e<\/th><\/tr><\/thead><tbody><tr><td>app\/Http\/Controllers\/BasicController.php<\/td><td>\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc<\/td><\/tr><tr><td>resources\/views\/home.blade.php<\/td><td>\u30d3\u30e5\u30fc<\/td><\/tr><tr><td>routes\/web.php<\/td><td>\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u30d3\u30e5\u30fc<\/h2>\n\n\n\n<p>\u4eca\u56de\u306f\u30d3\u30e5\u30fc\u306b\u3064\u3044\u3066\u306e\u8aac\u660e\u306f\u306a\u3044\u306e\u3067\u3001\u5185\u5bb9\u306f\u4efb\u610f\u3067\u69cb\u3044\u307e\u305b\u3093\u3002<br>\u4f8b\u3068\u3057\u3066\u3001\u4ee5\u4e0b\u306e\u30d3\u30e5\u30fc\u3092\u4f5c\u6210\u3057\u3066\u4e0b\u3055\u3044\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\" data-file=\"home.blade.php\"><code>&lt;h1&gt;\u30e1\u30a4\u30f3\u30bf\u30a4\u30c8\u30eb&lt;\/h1&gt;<\/code><\/pre><\/div>\n\n\n\n<h1 class=\"wp-block-heading\">\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u306e\u6e96\u5099<\/h2>\n\n\n\n<p>\u8aac\u660e\u306f\u5f8c\u3067\u3057\u307e\u3059\u304c\u3001\u4ee5\u4e0b\u306e\u5185\u5bb9\u3092\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u30d5\u30a1\u30a4\u30eb(web.php)\u3078\u8a18\u8f09\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\" data-file=\"web.php\"><code>Route::get(&#39;\/controller&#39;, &#39;BasicController@action&#39;);<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u306e\u8aac\u660e<\/h2>\n\n\n\n<p>\u4eca\u56de\u306f\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<br>\u305d\u306e\u70ba\u3001\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u5185\u3067\u4f7f\u7528\u3057\u305f\u3044\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3092\u6307\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<br>\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306e\u6307\u5b9a\u65b9\u6cd5\u306f <strong>\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u540d(\u30af\u30e9\u30b9\u540d)\u3068\u3001@\u4ee5\u964d\u306b\u5b9f\u884c\u3057\u305f\u3044\u30e1\u30bd\u30c3\u30c9\u540d<\/strong> \u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<br>\u4eca\u56de\u306e\u4f8b\u306f <strong>http:\/\/localhost\/controller<\/strong> \u3067\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068\u3001 <strong>&#8220;BasicController\u30af\u30e9\u30b9&#8221; \u306e &#8220;action&#8221; \u3068\u3044\u3046\u30e1\u30bd\u30c3\u30c9\u304c\u5b9f\u884c\u3055\u308c\u308b\u3053\u3068<\/strong> \u3092\u610f\u5473\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306e\u6e96\u5099<\/h2>\n\n\n\n<p>\u8aac\u660e\u306f\u5f8c\u3067\u3057\u307e\u3059\u304c\u3001 <strong>app\/Http\/Controllers\/BasicController.php<\/strong> \u3092\u4f5c\u6210\u3057\u307e\u3057\u3087\u3046\u3002<br>\u5185\u5bb9\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-php\" data-file=\"BasicController.php\" data-lang=\"PHP\"><code>&lt;?php\n\nnamespace App\\Http\\Controllers;\n\n\/\/ \u7d99\u627f\u3059\u308b\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u30af\u30e9\u30b9\u306e\u8aad\u307f\u8fbc\u307f\nuse App\\Http\\Controllers\\Controller;\n\n\/\/ \u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u30af\u30e9\u30b9\u3092\u7d99\u627f\u3059\u308b \nclass BasicController extends Controller\n{\n    public function action() {\n      return view(&#39;home&#39;);\n    }\n}<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306e\u8aac\u660e<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\u753b\u9762\u8868\u793a<\/h3>\n\n\n\n<p><strong>&#8220;\u4eca\u56de\u306f\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u304b\u3089\u30d3\u30e5\u30fc\u3092\u8868\u793a\u3057\u307e\u3059\u3002&#8221;<\/strong>\u3068\u5ba3\u8a00\u3057\u305f\u901a\u308a\u3001\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306e12\u884c\u76ee\u304c\u30d3\u30e5\u30fc\u3092\u8868\u793a\u3059\u308b\u51e6\u7406\u3068\u306a\u308a\u307e\u3059\u3002<br><strong>view\u95a2\u6570<\/strong> \u306b\u3064\u3044\u3066\u306f\u3001\u524d\u56de\u3092\u78ba\u8a8d\u3057\u3066\u4e0b\u3055\u3044\u3002<\/p>\n\n\n\n<div class=\"title_box\"><span class=\"box-title\">\u524d\u56de<\/span>\n<p><a href=\"https:\/\/dennie.tokyo\/it\/?p=695\" rel=\"noopener noreferrer\" target=\"_blank\">\u3010Laravel\u3011View \u753b\u9762\u8868\u793a\u8d85\u5165\u9580<\/a><\/p>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">\u540d\u524d\u7a7a\u9593<\/h3>\n\n\n\n<p>JAVA\u3084PHP\u3001\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306e\u3088\u3046\u306a\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u306b\u95a2\u4fc2\u306a\u304f\u3001<strong>\u540d\u524d\u7a7a\u9593<\/strong> \u3068\u3044\u3046\u6982\u5ff5\u304c\u3042\u308a\u307e\u3059\u3002<br>\u540d\u524d\u7a7a\u9593\u306e\u6982\u5ff5\u306b\u3064\u3044\u3066\u306f\u8a73\u3057\u304f\u8aac\u660e\u3057\u307e\u305b\u3093\u304c\u3001\u7c21\u5358\u306b\u8a00\u3046\u3068 <strong>\u81ea\u8eab\u304c\u3069\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u5b58\u5728\u3057\u3066\u3044\u307e\u3059<\/strong> \u3068\u3044\u3046\u3053\u3068\u3092\u610f\u5473\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4eca\u56de\u306f\u5177\u4f53\u7684\u306a\u4f8b\u304b\u3089\u540d\u524d\u7a7a\u9593\u306b\u3064\u3044\u3066\u7406\u89e3\u3057\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<br>Laravel\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u8a2d\u5b9a\u3067\u306f\u3001\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306e\u914d\u7f6e\u5834\u6240\u306f\u3001 <strong>app\/Http\/Controllers<\/strong> \u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002<br>Laravel\u3067\u306f\u3001namespace\u3092\u4f7f\u7528\u3057\u3066\u3001\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u81ea\u8eab\u304c\u3069\u3053\u306b\u3044\u308b\u304b\u3092\u8a8d\u8b58\u3055\u305b\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u304c\u540d\u524d\u7a7a\u9593\u3067\u3059\u3002<br>namespace\u306fPHP\u306e\u6a5f\u80fd\u306b\u306a\u308a\u307e\u3059\u306e\u3067\u3001\u8aac\u660e\u306f\u7701\u529b\u3055\u305b\u3066\u3044\u305f\u3060\u304d\u307e\u3059\u3002<br>\u4eca\u56de\u306e\u4f8b\u306f\u3001namespace\u306b <strong>App\\Http\\Controllers<\/strong> \u3092\u6307\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u306f\u3001<strong>BasicController.php \u304c app\/Http\/Controllers<\/strong> \u306b\u3044\u308b\u3053\u3068\u3092\u610f\u5473\u3057\u307e\u3059\u3002(3\u884c\u76ee)<br>\u201cApp\u201d \u304c \u201capp\u201d \u3068\u8a8d\u8b58\u3059\u308b\u3053\u3068\u306b\u3064\u3044\u3066\u306f\u3053\u3053\u3067\u306f\u8a18\u8f09\u3057\u307e\u305b\u3093\u3002\u5225\u306e\u6a5f\u4f1a\u306b\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-php\" data-file=\"BasicController.php\" data-lang=\"PHP\"><code>&lt;?php\n\nnamespace App\\Http\\Controllers;\n\n\/\/ \u7d99\u627f\u3059\u308b\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u30af\u30e9\u30b9\u306e\u8aad\u307f\u8fbc\u307f\nuse App\\Http\\Controllers\\Controller;\n\n\/\/ \u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u30af\u30e9\u30b9\u3092\u7d99\u627f\u3059\u308b \nclass BasicController extends Controller\n{\n    public function action() {\n      return view(&#39;home&#39;);\n    }\n}<\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u30af\u30e9\u30b9\u306e\u7d99\u627f<\/h3>\n\n\n\n<p>\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3092\u4f7f\u7528\u3059\u308b\u969b\u3001Controller\u30af\u30e9\u30b9(App\\Http\\Controllers\\Controller)\u3092\u7d99\u627f\u3057\u307e\u3059\u3002(9\u884c\u76ee)<br>use\u3092\u4f7f\u3044\u3001Controller\u30af\u30e9\u30b9\u3092\u8aad\u307f\u8fbc\u307f\u307e\u3059\u3002(6\u884c\u76ee)<br>use\u306fPHP\u306e\u6a5f\u80fd\u306b\u6a5f\u80fd\u306b\u306a\u308a\u307e\u3059\u306e\u3067\u3001\u8aac\u660e\u306f\u7701\u529b\u3055\u305b\u3066\u3044\u305f\u3060\u304d\u307e\u3059\u3002<br>\u307e\u305f\u3001\u7d99\u627f\u306b\u3064\u3044\u3066\u3082\u8aac\u660e\u306f\u7701\u529b\u3055\u305b\u3066\u3044\u305f\u3060\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-php\" data-file=\"BasicController.php\" data-lang=\"PHP\"><code>&lt;?php\n\nnamespace App\\Http\\Controllers;\n\n\/\/ \u7d99\u627f\u3059\u308b\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u30af\u30e9\u30b9\u306e\u8aad\u307f\u8fbc\u307f\nuse App\\Http\\Controllers\\Controller;\n\n\/\/ \u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u30af\u30e9\u30b9\u3092\u7d99\u627f\u3059\u308b \nclass BasicController extends Controller\n{\n    public function action() {\n      return view(&#39;home&#39;);\n    }\n}<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u30d5\u30a1\u30a4\u30eb\u306e\u914d\u7f6e\u5834\u6240<\/h2>\n\n\n\n<p>\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u30d5\u30a1\u30a4\u30eb\u3092\u914d\u7f6e\u3059\u308b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306f\u3001\u4ee5\u4e0b\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30fb\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u30d5\u30a1\u30a4\u30eb\u306e\u5834\u6240<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>app\/Http\/Controllers<\/code><\/pre><\/div>\n\n\n\n<h1 class=\"wp-block-heading\">\u78ba\u8a8d<\/h1>\n\n\n\n<p>\u6700\u5f8c\u306b\u3001\u4eca\u307e\u3067\u306e\u8aac\u660e\u3068\u6e96\u5099\u3092\u8e0f\u307e\u3048\u3001\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306e\u52d5\u4f5c\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<br>\u30d6\u30e9\u30a6\u30b6\u3078\u4ee5\u4e0b\u306eURL\u3092\u5165\u529b\u3057\u307e\u3059\u3002<br>\u3046\u307e\u304f\u3044\u3051\u3070\u3001\u30d3\u30e5\u30fc\u306e\u5185\u5bb9\u304c\u898b\u308c\u308b\u306f\u305a\u3067\u3059\u3002<br>URL\u306e\u30c9\u30e1\u30a4\u30f3\u90e8\u5206\u306b\u3064\u3044\u3066\u306f\u9069\u5b9c\u5909\u66f4\u3057\u3066\u4e0b\u3055\u3044\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>http:\/\/localhost\/controller<\/code><\/pre><\/div>\n\n\n\n<h1 class=\"wp-block-heading\">\u6700\u5f8c\u306b<\/h1>\n\n\n\n<p>\u6b21\u56de\u306f\u3001\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u304b\u3089\u30d3\u30e5\u30fc\u3078\u5909\u6570\u3092\u6e21\u3057\u65b9\u3092\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"title_box\">\n<span class=\"box-title\">\u6b21\u56de<\/span><p><a href=\"https:\/\/dennie.tokyo\/it\/?p=887\" rel=\"noopener\" target=\"_blank\">\u3010Laravel\u3011\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc View\u3078\u5909\u6570\u3092\u6e21\u3059<\/a><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u56de\u306f\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u304b\u3089\u30d3\u30e5\u30fc\u3092\u8868\u793a\u3057\u307e\u3057\u305f\u3002<\/p>\n","protected":false},"author":1,"featured_media":968,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[],"class_list":["post-854","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-laravel"],"_links":{"self":[{"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=\/wp\/v2\/posts\/854","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=854"}],"version-history":[{"count":66,"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=\/wp\/v2\/posts\/854\/revisions"}],"predecessor-version":[{"id":3447,"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=\/wp\/v2\/posts\/854\/revisions\/3447"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=\/wp\/v2\/media\/968"}],"wp:attachment":[{"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=854"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=854"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=854"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}