{"id":221,"date":"2025-02-26T23:02:32","date_gmt":"2025-02-26T14:02:32","guid":{"rendered":"https:\/\/hexis.jp\/?p=221"},"modified":"2025-02-26T23:02:32","modified_gmt":"2025-02-26T14:02:32","slug":"ddd%e3%81%a8%e3%82%af%e3%83%aa%e3%83%bc%e3%83%b3%e3%82%a2%e3%83%bc%e3%82%ad%e3%83%86%e3%82%af%e3%83%81%e3%83%a3%e3%81%ae%e5%90%84%e5%b1%a4%e3%82%92%e7%90%86%e8%a7%a3%e3%81%97%e3%82%88%e3%81%86","status":"publish","type":"post","link":"https:\/\/hexis.jp\/?p=221","title":{"rendered":"DDD\u3068\u30af\u30ea\u30fc\u30f3\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306e\u5404\u5c64\u3092\u7406\u89e3\u3057\u3088\u3046\uff01\u8cac\u52d9\u3092\u660e\u78ba\u306b\u3057\u3066\u9069\u5207\u306a\u8a2d\u8a08\u3092\u5b9f\u73fe"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"1_%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB\"><\/span><strong>1. \u306f\u3058\u3081\u306b<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Laravel \u00d7 DDD \u00d7 \u30af\u30ea\u30fc\u30f3\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u3068\u306f\uff1f<\/h3>\n\n\n\n<p>Laravel\u306f\u3001\u30b7\u30f3\u30d7\u30eb\u306aMVC\uff08Model-View-Controller\uff09\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u3092\u63a1\u7528\u3057\u3066\u304a\u308a\u3001\u76f4\u611f\u7684\u306b\u958b\u767a\u304c\u3067\u304d\u308b\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u3059\u3002\u3057\u304b\u3057\u3001\u30a2\u30d7\u30ea\u304c\u6210\u9577\u3059\u308b\u306b\u3064\u308c\u3001\u6b21\u306e\u3088\u3046\u306a\u8ab2\u984c\u306b\u76f4\u9762\u3059\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Fat Controller \/ Fat Model \u554f\u984c<\/strong>\uff1a\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3084\u30e2\u30c7\u30eb\u306b\u30ed\u30b8\u30c3\u30af\u304c\u96c6\u4e2d\u3057\u3001\u53ef\u8aad\u6027\u3084\u30c6\u30b9\u30c8\u306e\u3057\u3084\u3059\u3055\u304c\u4f4e\u4e0b<\/li>\n\n\n\n<li><strong>\u5909\u66f4\u306b\u5f31\u3044\u8a2d\u8a08<\/strong>\uff1a\u30d3\u30b8\u30cd\u30b9\u30ed\u30b8\u30c3\u30af\u3068\u30a4\u30f3\u30d5\u30e9\u5c64\uff08\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u64cd\u4f5c\u306a\u3069\uff09\u304c\u5bc6\u7d50\u5408\u3057\u3066\u3057\u307e\u3044\u3001\u5909\u66f4\u304c\u96e3\u3057\u304f\u306a\u308b<\/li>\n\n\n\n<li><strong>\u518d\u5229\u7528\u6027\u306e\u4f4e\u4e0b<\/strong>\uff1a\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u5168\u4f53\u306e\u8a2d\u8a08\u304c\u4e00\u8cab\u3057\u306a\u3044\u305f\u3081\u3001\u30b3\u30fc\u30c9\u306e\u518d\u5229\u7528\u304c\u96e3\u3057\u304f\u306a\u308b<\/li>\n<\/ul>\n\n\n\n<p>\u3053\u3046\u3057\u305f\u8ab2\u984c\u3092\u89e3\u6c7a\u3059\u308b\u305f\u3081\u306b\u6ce8\u76ee\u3055\u308c\u3066\u3044\u308b\u306e\u304c\u3001<strong>DDD\uff08\u30c9\u30e1\u30a4\u30f3\u99c6\u52d5\u8a2d\u8a08\uff09<\/strong> \u3068 <strong>\u30af\u30ea\u30fc\u30f3\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3<\/strong> \u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u672c\u8a18\u4e8b\u306e\u76ee\u7684<\/h3>\n\n\n\n<p>\u672c\u8a18\u4e8b\u3067\u306f\u3001<strong>DDD\u3068\u30af\u30ea\u30fc\u30f3\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306e\u9055\u3044\u30fb\u5171\u901a\u70b9\u3092\u6574\u7406\u3057\u3001Laravel\u306b\u3069\u306e\u3088\u3046\u306b\u9069\u7528\u3067\u304d\u308b\u306e\u304b\u3092\u89e3\u8aac<\/strong> \u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u5177\u4f53\u7684\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u30dd\u30a4\u30f3\u30c8\u3092\u62bc\u3055\u3048\u306a\u304c\u3089\u9032\u3081\u3066\u3044\u304d\u307e\u3059\u3002<br>\u2705 <strong>DDD\u3068\u30af\u30ea\u30fc\u30f3\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306e\u57fa\u672c\u6982\u5ff5\u3092\u7406\u89e3\u3059\u308b<\/strong><br>\u2705 <strong>Laravel\u306e\u69cb\u9020\u3068\u3001DDD\/\u30af\u30ea\u30fc\u30f3\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306e\u95a2\u4fc2\u3092\u6574\u7406\u3059\u308b<\/strong><br>\u2705 <strong>\u5b9f\u969b\u306b\u30d5\u30a9\u30eb\u30c0\u69cb\u6210\u3092\u8003\u3048\u3001\u30b3\u30fc\u30c9\u4f8b\u3092\u4ea4\u3048\u306a\u304c\u3089\u5b9f\u88c5\u30d5\u30ed\u30fc\u3092\u89e3\u8aac\u3059\u308b<\/strong><\/p>\n\n\n\n<p>\u3053\u308c\u3092\u8aad\u3080\u3053\u3068\u3067\u3001<strong>\u300cLaravel\u3067DDD\u00d7\u30af\u30ea\u30fc\u30f3\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u3092\u9069\u7528\u3059\u308b\u30a4\u30e1\u30fc\u30b8\u300d<\/strong> \u3092\u3064\u304b\u3081\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\uff01\u2728<\/p>\n\n\n\n<p>\u3067\u306f\u307e\u305a\u3001<strong>DDD\u3068\u30af\u30ea\u30fc\u30f3\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306e\u9055\u3044\u30fb\u5171\u901a\u70b9<\/strong> \u304b\u3089\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\uff01<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"2_DDD%E3%81%A8%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%A2%E3%83%BC%E3%82%AD%E3%83%86%E3%82%AF%E3%83%81%E3%83%A3%E3%81%AE%E9%81%95%E3%81%84%E3%83%BB%E5%85%B1%E9%80%9A%E7%82%B9\"><\/span><strong>2. DDD\u3068\u30af\u30ea\u30fc\u30f3\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306e\u9055\u3044\u30fb\u5171\u901a\u70b9<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>DDD\uff08\u30c9\u30e1\u30a4\u30f3\u99c6\u52d5\u8a2d\u8a08\uff09\u3068\u306f\uff1f<\/strong><\/h3>\n\n\n\n<p>DDD\uff08Domain-Driven Design\u3001\u30c9\u30e1\u30a4\u30f3\u99c6\u52d5\u8a2d\u8a08\uff09\u306f\u3001\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306e\u8a2d\u8a08\u306b\u304a\u3044\u3066 <strong>\u300c\u30d3\u30b8\u30cd\u30b9\u30ed\u30b8\u30c3\u30af\u3092\u4e2d\u5fc3\u306b\u8003\u3048\u308b\u300d<\/strong> \u3053\u3068\u3092\u91cd\u8996\u3059\u308b\u30a2\u30d7\u30ed\u30fc\u30c1\u3067\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>DDD\u306e\u4e3b\u306a\u6982\u5ff5<\/strong><\/h4>\n\n\n\n<p>DDD\u3067\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u6982\u5ff5\u304c\u767b\u5834\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u2705 <strong>\u30a8\u30f3\u30c6\u30a3\u30c6\u30a3\uff08Entity\uff09<\/strong><br>\u4e00\u610f\u306e\u8b58\u5225\u5b50\uff08ID\uff09\u3092\u6301\u3061\u3001\u72b6\u614b\u3092\u6301\u3064\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3002\u4f8b\uff1a<code>User<\/code> \u3084 <code>Order<\/code> \u306a\u3069\u3002<\/p>\n\n\n\n<p>\u2705 <strong>\u5024\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\uff08Value Object\uff09<\/strong><br>ID\u3092\u6301\u305f\u305a\u3001\u5c5e\u6027\u304c\u540c\u3058\u306a\u3089\u540c\u4e00\u3068\u898b\u306a\u3055\u308c\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3002\u4f8b\uff1a<code>Email<\/code> \u3084 <code>Money<\/code> \u306a\u3069\u3002<\/p>\n\n\n\n<p>\u2705 <strong>\u30c9\u30e1\u30a4\u30f3\u30b5\u30fc\u30d3\u30b9\uff08Domain Service\uff09<\/strong><br>\u30a8\u30f3\u30c6\u30a3\u30c6\u30a3\u3084\u5024\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3060\u3051\u3067\u306f\u8868\u73fe\u3057\u306b\u304f\u3044\u30d3\u30b8\u30cd\u30b9\u30ed\u30b8\u30c3\u30af\u3092\u6271\u3046\u30af\u30e9\u30b9\u3002<\/p>\n\n\n\n<p>\u2705 <strong>\u30ea\u30dd\u30b8\u30c8\u30ea\uff08Repository\uff09<\/strong><br>\u30a8\u30f3\u30c6\u30a3\u30c6\u30a3\u306e\u6c38\u7d9a\u5316\uff08\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u4fdd\u5b58\u30fb\u53d6\u5f97\uff09\u3092\u62bd\u8c61\u5316\u3059\u308b\u3002<\/p>\n\n\n\n<p>\u2705 <strong>\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\uff08Use Case\uff09<\/strong><br>\u30d3\u30b8\u30cd\u30b9\u30ed\u30b8\u30c3\u30af\u306e\u6d41\u308c\u3092\u5b9a\u7fa9\u3057\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u52d5\u4f5c\u3092\u7d71\u5236\u3059\u308b\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u30af\u30ea\u30fc\u30f3\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u3068\u306f\uff1f<\/strong><\/h3>\n\n\n\n<p>\u30af\u30ea\u30fc\u30f3\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306f\u3001<strong>\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306e\u4f9d\u5b58\u95a2\u4fc2\u3092\u6574\u7406\u3057\u3001\u4fdd\u5b88\u6027\u30fb\u30c6\u30b9\u30c8\u3057\u3084\u3059\u3055\u3092\u5411\u4e0a\u3055\u305b\u308b\u305f\u3081\u306e\u8a2d\u8a08\u539f\u5247<\/strong> \u3067\u3059\u3002<\/p>\n\n\n\n<p>\u30af\u30ea\u30fc\u30f3\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306e\u57fa\u672c\u69cb\u9020\u306f\u3001<strong>\u300c\u540c\u5fc3\u5186\u72b6\u306e\u30ec\u30a4\u30e4\u30fc\u300d<\/strong> \u3067\u8868\u73fe\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<p>\ud83d\udd35 <strong>\u30c9\u30e1\u30a4\u30f3\u5c64\uff08Entities\uff09<\/strong> - \u30a2\u30d7\u30ea\u306e\u6838\u3068\u306a\u308b\u30d3\u30b8\u30cd\u30b9\u30eb\u30fc\u30eb<br>\ud83d\udfe2 <strong>\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u5c64\uff08Use Cases\uff09<\/strong> - \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u64cd\u4f5c\u306e\u6d41\u308c\u3092\u5b9a\u7fa9<br>\ud83d\udfe1 <strong>\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u5c64\uff08Interface Adapters\uff09<\/strong> - \u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3084\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9<br>\ud83d\udfe0 <strong>\u30a4\u30f3\u30d5\u30e9\u5c64\uff08Frameworks &amp; Drivers\uff09<\/strong> - \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3084\u5916\u90e8API\u306a\u3069<\/p>\n\n\n\n<p>\ud83d\udc49 <strong>\u539f\u5247<\/strong>\uff1a\u300c\u5185\u5074\u306e\u5c64\u306f\u5916\u5074\u306b\u4f9d\u5b58\u3057\u3066\u306f\u3044\u3051\u306a\u3044\uff08\u4f9d\u5b58\u6027\u9006\u8ee2\u306e\u539f\u5247\uff09\u300d<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>DDD\u3068\u30af\u30ea\u30fc\u30f3\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306e\u95a2\u4fc2<\/strong><\/h3>\n\n\n\n<p>DDD\u3068\u30af\u30ea\u30fc\u30f3\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306f\u3001\u76f8\u4e92\u306b\u88dc\u5b8c\u3057\u5408\u3046\u95a2\u4fc2\u3067\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u30af\u30ea\u30fc\u30f3\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3<\/th><th>DDD\u306e\u5bfe\u5fdc\u6982\u5ff5<\/th><\/tr><\/thead><tbody><tr><td><strong>\u30a8\u30f3\u30c6\u30a3\u30c6\u30a3\uff08Entities\uff09<\/strong><\/td><td><strong>\u30a8\u30f3\u30c6\u30a3\u30c6\u30a3 \/ \u5024\u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/td><\/tr><tr><td><strong>\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\uff08Use Cases\uff09<\/strong><\/td><td><strong>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b5\u30fc\u30d3\u30b9\uff08Use Case\uff09<\/strong><\/td><\/tr><tr><td><strong>\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u5c64\uff08Interface Adapters\uff09<\/strong><\/td><td><strong>\u30ea\u30dd\u30b8\u30c8\u30ea \/ \u30c9\u30e1\u30a4\u30f3\u30b5\u30fc\u30d3\u30b9<\/strong><\/td><\/tr><tr><td><strong>\u30a4\u30f3\u30d5\u30e9\u5c64\uff08Infrastructure\uff09<\/strong><\/td><td><strong>Eloquent\u30e2\u30c7\u30eb\u3001API\u901a\u4fe1<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\ud83d\udc49 <strong>\u30dd\u30a4\u30f3\u30c8<\/strong><br>DDD\u306e\u300c\u30c9\u30e1\u30a4\u30f3\u5c64\u300d\u306f\u3001\u30af\u30ea\u30fc\u30f3\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306e\u300c\u30a8\u30f3\u30c6\u30a3\u30c6\u30a3\uff08Entities\uff09\u300d\u3068\u4e00\u81f4\u3057\u307e\u3059\u3002<br>\u307e\u305f\u3001\u300c\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u5c64\u300d\u306f\u3001DDD\u306e\u300c\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b5\u30fc\u30d3\u30b9\u300d\u306b\u5bfe\u5fdc\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3053\u308c\u3089\u306e\u6982\u5ff5\u3092\u7d44\u307f\u5408\u308f\u305b\u308b\u3053\u3068\u3067\u3001Laravel\u3067\u3082 <strong>\u300c\u30d3\u30b8\u30cd\u30b9\u30ed\u30b8\u30c3\u30af\u3092\u9069\u5207\u306b\u5206\u96e2\u3057\u3001\u5909\u66f4\u306b\u5f37\u3044\u8a2d\u8a08\u300d<\/strong> \u3092\u5b9f\u73fe\u3067\u304d\u307e\u3059\uff01<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"3_Laravel%E3%81%AB%E9%81%A9%E7%94%A8%E3%81%99%E3%82%8B%E3%82%A2%E3%83%BC%E3%82%AD%E3%83%86%E3%82%AF%E3%83%81%E3%83%A3%E6%A7%8B%E6%88%90\"><\/span><strong>3. Laravel\u306b\u9069\u7528\u3059\u308b\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u69cb\u6210<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Laravel\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u69cb\u6210\uff08MVC\uff09<\/strong><\/h3>\n\n\n\n<p>Laravel\u306e\u6a19\u6e96\u7684\u306a\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306f\u3001<strong>MVC\uff08Model-View-Controller\uff09\u30d1\u30bf\u30fc\u30f3<\/strong> \u306b\u57fa\u3065\u3044\u3066\u3044\u307e\u3059\u3002<br>\u901a\u5e38\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30d5\u30a9\u30eb\u30c0\u69cb\u6210\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>app\/\n\u251c\u2500\u2500 Http\/Controllers\/   # \u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\uff08\u30d7\u30ec\u30bc\u30f3\u30c6\u30fc\u30b7\u30e7\u30f3\u5c64\uff09\n\u251c\u2500\u2500 Models\/             # Eloquent\u30e2\u30c7\u30eb\uff08\u30d3\u30b8\u30cd\u30b9\u30ed\u30b8\u30c3\u30af\uff0bDB\u64cd\u4f5c\uff09\n\u251c\u2500\u2500 Providers\/          # \u30b5\u30fc\u30d3\u30b9\u30d7\u30ed\u30d0\u30a4\u30c0\ndatabase\/\n\u251c\u2500\u2500 migrations\/         # \u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\n\u251c\u2500\u2500 factories\/          # \u30c7\u30fc\u30bf\u751f\u6210\u7528\u30d5\u30a1\u30af\u30c8\u30ea<\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u306a\u305cDDD\u30fb\u30af\u30ea\u30fc\u30f3\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u3092\u9069\u7528\u3059\u308b\u306e\u304b\uff1f<\/strong><\/h3>\n\n\n\n<p>Laravel\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u69cb\u9020\u3067\u306f\u3001<strong>Eloquent\u30e2\u30c7\u30eb\u306b\u30d3\u30b8\u30cd\u30b9\u30ed\u30b8\u30c3\u30af\u304c\u96c6\u4e2d\u3057\u3084\u3059\u304f\u3001Fat Model\u554f\u984c\u304c\u767a\u751f\u3057\u304c\u3061<\/strong> \u3067\u3059\u3002<br>\u307e\u305f\u3001\u30d3\u30b8\u30cd\u30b9\u30ed\u30b8\u30c3\u30af\u3068\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u64cd\u4f5c\u304c\u5bc6\u7d50\u5408\u3057\u3001\u30c6\u30b9\u30c8\u3084\u4fdd\u5b88\u304c\u96e3\u3057\u304f\u306a\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u305d\u3053\u3067\u3001DDD\u3068\u30af\u30ea\u30fc\u30f3\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306e\u8003\u3048\u65b9\u3092\u9069\u7528\u3057\u3001<strong>\u30d3\u30b8\u30cd\u30b9\u30ed\u30b8\u30c3\u30af\u3068\u30a4\u30f3\u30d5\u30e9\u5c64\u3092\u5206\u96e2\u3059\u308b\u69cb\u6210<\/strong> \u306b\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>DDD\u00d7\u30af\u30ea\u30fc\u30f3\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u3092\u9069\u7528\u3057\u305fLaravel\u306e\u30d5\u30a9\u30eb\u30c0\u69cb\u6210<\/strong><\/h3>\n\n\n\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30d5\u30a9\u30eb\u30c0\u3092\u5206\u3051\u308b\u3053\u3068\u3067\u3001\u5404\u8cac\u52d9\u3092\u660e\u78ba\u306b\u3057\u3001\u4fdd\u5b88\u6027\u30fb\u53ef\u8aad\u6027\u3092\u5411\u4e0a\u3055\u305b\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>app\/\n\u251c\u2500\u2500 Domain\/             # \u30c9\u30e1\u30a4\u30f3\u5c64\uff08\u30a8\u30f3\u30c6\u30a3\u30c6\u30a3\u3001\u5024\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3001\u30c9\u30e1\u30a4\u30f3\u30b5\u30fc\u30d3\u30b9\uff09\n\u2502   \u251c\u2500\u2500 Entities\/      # \u30a8\u30f3\u30c6\u30a3\u30c6\u30a3\uff08\u4f8b\uff1aUser.php\uff09\n\u2502   \u251c\u2500\u2500 ValueObjects\/  # \u5024\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\uff08\u4f8b\uff1aEmail.php\uff09\n\u2502   \u251c\u2500\u2500 Services\/      # \u30c9\u30e1\u30a4\u30f3\u30b5\u30fc\u30d3\u30b9\uff08\u4f8b\uff1aUserDomainService.php\uff09\n\u2502   \u2514\u2500\u2500 Repositories\/  # \u30ea\u30dd\u30b8\u30c8\u30ea\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\uff08\u4f8b\uff1aUserRepositoryInterface.php\uff09\n\u2502\n\u251c\u2500\u2500 Application\/        # \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u5c64\uff08\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\uff09\n\u2502   \u251c\u2500\u2500 DTOs\/          # \u30c7\u30fc\u30bf\u8ee2\u9001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\uff08\u4f8b\uff1aUserDTO.php\uff09\n\u2502   \u251c\u2500\u2500 UseCases\/      # \u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\uff08\u4f8b\uff1aCreateUserUseCase.php\uff09\n\u2502\n\u251c\u2500\u2500 Infrastructure\/     # \u30a4\u30f3\u30d5\u30e9\u5c64\uff08DB\u30fbAPI\u30fb\u5916\u90e8\u30b5\u30fc\u30d3\u30b9\u3068\u306e\u9023\u643a\uff09\n\u2502   \u251c\u2500\u2500 Persistence\/   # DB\u30ea\u30dd\u30b8\u30c8\u30ea\u5b9f\u88c5\uff08\u4f8b\uff1aUserEloquentRepository.php\uff09\n\u2502   \u251c\u2500\u2500 Services\/      # API\u901a\u4fe1\u306a\u3069\u306e\u5916\u90e8\u9023\u643a\uff08\u4f8b\uff1aPaymentService.php\uff09\n\u2502\n\u251c\u2500\u2500 Http\/              # \u30d7\u30ec\u30bc\u30f3\u30c6\u30fc\u30b7\u30e7\u30f3\u5c64\uff08\u30ea\u30af\u30a8\u30b9\u30c8\u306e\u53d7\u4ed8\uff09\n\u2502   \u251c\u2500\u2500 Controllers\/   # \u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\uff08\u4f8b\uff1aUserController.php\uff09\n\u2502   \u251c\u2500\u2500 Requests\/      # \u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\uff08\u4f8b\uff1aCreateUserRequest.php\uff09\n\u2502   \u251c\u2500\u2500 Responses\/     # \u30ec\u30b9\u30dd\u30f3\u30b9\u7528\u30af\u30e9\u30b9<\/code><\/pre><\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u5404\u5c64\u306e\u5f79\u5272\u3068Laravel\u306e\u5bfe\u5fdc\u90e8\u5206<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><strong>\u5c64<\/strong><\/th><th><strong>\u5f79\u5272<\/strong><\/th><th><strong>Laravel\u3067\u306e\u5bfe\u5fdc\u90e8\u5206<\/strong><\/th><\/tr><\/thead><tbody><tr><td><strong>\u30c9\u30e1\u30a4\u30f3\u5c64\uff08Domain\uff09<\/strong><\/td><td>\u30d3\u30b8\u30cd\u30b9\u30eb\u30fc\u30eb\u3092\u5b9a\u7fa9\uff08\u30a8\u30f3\u30c6\u30a3\u30c6\u30a3\u30fb\u5024\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\uff09<\/td><td><code>app\/Domain\/<\/code><\/td><\/tr><tr><td><strong>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u5c64\uff08Application\uff09<\/strong><\/td><td>\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u306e\u5b9f\u88c5\uff08\u30a2\u30d7\u30ea\u306e\u64cd\u4f5c\u30d5\u30ed\u30fc\u3092\u7ba1\u7406\uff09<\/td><td><code>app\/Application\/UseCases\/<\/code><\/td><\/tr><tr><td><strong>\u30a4\u30f3\u30d5\u30e9\u5c64\uff08Infrastructure\uff09<\/strong><\/td><td>DB\u3084API\u3068\u306e\u9023\u643a\u3092\u62c5\u5f53<\/td><td><code>app\/Infrastructure\/Persistence\/<\/code><\/td><\/tr><tr><td><strong>\u30d7\u30ec\u30bc\u30f3\u30c6\u30fc\u30b7\u30e7\u30f3\u5c64\uff08Http\uff09<\/strong><\/td><td>\u30e6\u30fc\u30b6\u30fc\u304b\u3089\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u51e6\u7406<\/td><td><code>app\/Http\/Controllers\/<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u30dd\u30a4\u30f3\u30c8<\/strong><\/h3>\n\n\n\n<p>\u2705 <strong>\u30d3\u30b8\u30cd\u30b9\u30ed\u30b8\u30c3\u30af\u3092Eloquent\u30e2\u30c7\u30eb\u306b\u66f8\u304b\u305a\u3001\u30c9\u30e1\u30a4\u30f3\u5c64\u3067\u7ba1\u7406\u3059\u308b<\/strong><br>\u2705 <strong>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3084API\u306e\u51e6\u7406\u306f\u3001\u30a4\u30f3\u30d5\u30e9\u5c64\uff08Infrastructure\uff09\u306b\u5206\u96e2\u3059\u308b<\/strong><br>\u2705 <strong>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u5c64\u3067\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u3092\u7ba1\u7406\u3057\u3001\u8cac\u52d9\u3092\u660e\u78ba\u306b\u3059\u308b<\/strong><\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"4_%E5%85%B7%E4%BD%93%E7%9A%84%E3%81%AA%E5%AE%9F%E8%A3%85%E3%83%95%E3%83%AD%E3%83%BC\"><\/span><strong>4. \u5177\u4f53\u7684\u306a\u5b9f\u88c5\u30d5\u30ed\u30fc<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u3053\u3053\u3067\u306f\u3001<strong>DDD\u00d7\u30af\u30ea\u30fc\u30f3\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u3092\u9069\u7528\u3057\u305fLaravel\u306e\u5b9f\u88c5\u65b9\u6cd5<\/strong> \u3092\u3001\u4ee5\u4e0b\u306e\u6d41\u308c\u3067\u89e3\u8aac\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u30c9\u30e1\u30a4\u30f3\u5c64\u306e\u5b9f\u88c5<\/strong>\uff08\u30a8\u30f3\u30c6\u30a3\u30c6\u30a3\u30fb\u5024\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30fb\u30c9\u30e1\u30a4\u30f3\u30b5\u30fc\u30d3\u30b9\uff09<\/li>\n\n\n\n<li><strong>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u5c64\u306e\u5b9f\u88c5<\/strong>\uff08\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u30fbDTO\uff09<\/li>\n\n\n\n<li><strong>\u30a4\u30f3\u30d5\u30e9\u5c64\u306e\u5b9f\u88c5<\/strong>\uff08\u30ea\u30dd\u30b8\u30c8\u30ea\uff09<\/li>\n\n\n\n<li><strong>\u30d7\u30ec\u30bc\u30f3\u30c6\u30fc\u30b7\u30e7\u30f3\u5c64\u306e\u5b9f\u88c5<\/strong>\uff08\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\uff09<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>4.1 \u30c9\u30e1\u30a4\u30f3\u5c64\u306e\u5b9f\u88c5<\/strong><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>(1) \u30a8\u30f3\u30c6\u30a3\u30c6\u30a3\u306e\u4f5c\u6210<\/strong><\/h4>\n\n\n\n<p>\u30a8\u30f3\u30c6\u30a3\u30c6\u30a3\u306f\u3001\u30c9\u30e1\u30a4\u30f3\u306e<strong>\u4e3b\u8981\u306a\u30d3\u30b8\u30cd\u30b9\u30eb\u30fc\u30eb\u3092\u6301\u3064\u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong>\u3067\u3059\u3002<br>\u4f8b\u3048\u3070\u3001<code>User<\/code> \u30a8\u30f3\u30c6\u30a3\u30c6\u30a3\u3092\u4f5c\u6210\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<p>\ud83d\udccc <code>app\/Domain\/Entities\/User.php<\/code><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>namespace App\\Domain\\Entities;\n\nclass User\n{\n    private int $id;\n    private string $name;\n    private string $email;\n\n    public function __construct(int $id, string $name, string $email)\n    {\n        $this-&gt;id = $id;\n        $this-&gt;name = $name;\n        $this-&gt;email = $email;\n    }\n\n    public function getId(): int\n    {\n        return $this-&gt;id;\n    }\n\n    public function getName(): string\n    {\n        return $this-&gt;name;\n    }\n\n    public function getEmail(): string\n    {\n        return $this-&gt;email;\n    }\n}<\/code><\/pre><\/div>\n\n\n\n<p>\ud83d\udc49 <strong>\u30dd\u30a4\u30f3\u30c8<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u30a8\u30f3\u30c6\u30a3\u30c6\u30a3\u306f<strong>\u30d3\u30b8\u30cd\u30b9\u30eb\u30fc\u30eb\u3092\u8868\u73fe<\/strong>\u3057\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u64cd\u4f5c\u306e\u30ed\u30b8\u30c3\u30af\u3092\u6301\u305f\u305b\u306a\u3044\u3002<\/li>\n\n\n\n<li><code>getId()<\/code> \u3084 <code>getEmail()<\/code> \u306a\u3069\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u4f5c\u6210\u3057\u3001\u30c7\u30fc\u30bf\u306e\u53d6\u5f97\u3092\u9069\u5207\u306b\u7ba1\u7406\u3059\u308b\u3002<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>(2) \u5024\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u4f5c\u6210<\/strong><\/h4>\n\n\n\n<p>\u5024\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306f\u3001<strong>ID\u3092\u6301\u305f\u305a\u3001\u5c5e\u6027\u304c\u540c\u3058\u306a\u3089\u540c\u4e00\u3068\u307f\u306a\u3055\u308c\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong> \u3067\u3059\u3002<br>\u4f8b\u3048\u3070\u3001<code>Email<\/code> \u5024\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<p>\ud83d\udccc <code>app\/Domain\/ValueObjects\/Email.php<\/code><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>namespace App\\Domain\\ValueObjects;\n\nclass Email\n{\n    private string $email;\n\n    public function __construct(string $email)\n    {\n        if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {\n            throw new \\InvalidArgumentException(&quot;Invalid email format.&quot;);\n        }\n        $this-&gt;email = $email;\n    }\n\n    public function getValue(): string\n    {\n        return $this-&gt;email;\n    }\n}<\/code><\/pre><\/div>\n\n\n\n<p>\ud83d\udc49 <strong>\u30dd\u30a4\u30f3\u30c8<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306e\u5f62\u5f0f\u30c1\u30a7\u30c3\u30af\u3092\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u3067\u884c\u3044\u3001<strong>\u4e0d\u6b63\u306a\u5024\u3092\u9632\u3050<\/strong>\u3002<\/li>\n\n\n\n<li><code>getValue()<\/code> \u30e1\u30bd\u30c3\u30c9\u3067\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306e\u5024\u3092\u53d6\u5f97\u3059\u308b\u3002<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>(3) \u30c9\u30e1\u30a4\u30f3\u30b5\u30fc\u30d3\u30b9\u306e\u4f5c\u6210<\/strong><\/h4>\n\n\n\n<p>\u30c9\u30e1\u30a4\u30f3\u30b5\u30fc\u30d3\u30b9\u306f\u3001<strong>\u30a8\u30f3\u30c6\u30a3\u30c6\u30a3\u3084\u5024\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3060\u3051\u3067\u306f\u8868\u73fe\u3057\u306b\u304f\u3044\u30d3\u30b8\u30cd\u30b9\u30ed\u30b8\u30c3\u30af<\/strong> \u3092\u62c5\u5f53\u3057\u307e\u3059\u3002<br>\u4f8b\u3048\u3070\u3001\u300c\u30e6\u30fc\u30b6\u30fc\u306e\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u304c\u3059\u3067\u306b\u5b58\u5728\u3059\u308b\u304b\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u300d\u30c9\u30e1\u30a4\u30f3\u30b5\u30fc\u30d3\u30b9\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\ud83d\udccc <code>app\/Domain\/Services\/UserDomainService.php<\/code><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>namespace App\\Domain\\Services;\n\nuse App\\Domain\\Repositories\\UserRepositoryInterface;\nuse App\\Domain\\ValueObjects\\Email;\n\nclass UserDomainService\n{\n    private UserRepositoryInterface $userRepository;\n\n    public function __construct(UserRepositoryInterface $userRepository)\n    {\n        $this-&gt;userRepository = $userRepository;\n    }\n\n    public function isEmailAlreadyTaken(Email $email): bool\n    {\n        return $this-&gt;userRepository-&gt;findByEmail($email) !== null;\n    }\n}<\/code><\/pre><\/div>\n\n\n\n<p>\ud83d\udc49 <strong>\u30dd\u30a4\u30f3\u30c8<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>UserRepositoryInterface<\/code> \u3092\u4f7f\u3063\u3066\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3057\u3001<strong>\u30c9\u30e1\u30a4\u30f3\u30b5\u30fc\u30d3\u30b9\u306f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u8a73\u7d30\u3092\u77e5\u3089\u306a\u3044<\/strong>\u3002<\/li>\n\n\n\n<li>\u4f9d\u5b58\u95a2\u4fc2\u3092\u6ce8\u5165\uff08DI\uff09\u3059\u308b\u3053\u3068\u3067\u3001\u30c6\u30b9\u30c8\u3057\u3084\u3059\u304f\u3059\u308b\u3002<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>4.2 \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u5c64\u306e\u5b9f\u88c5<\/strong><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>(1) DTO\uff08\u30c7\u30fc\u30bf\u8ee2\u9001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\uff09\u306e\u4f5c\u6210<\/strong><\/h4>\n\n\n\n<p>DTO\uff08Data Transfer Object\uff09\u306f\u3001<strong>\u30c7\u30fc\u30bf\u306e\u53d7\u3051\u6e21\u3057\u306b\u4f7f\u3046\u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong> \u3067\u3059\u3002<br>\u4f8b\u3048\u3070\u3001<code>UserDTO<\/code> \u3092\u4f5c\u6210\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<p>\ud83d\udccc <code>app\/Application\/DTOs\/UserDTO.php<\/code><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>namespace App\\Application\\DTOs;\n\nclass UserDTO\n{\n    public string $name;\n    public string $email;\n\n    public function __construct(string $name, string $email)\n    {\n        $this-&gt;name = $name;\n        $this-&gt;email = $email;\n    }\n}<\/code><\/pre><\/div>\n\n\n\n<p>\ud83d\udc49 <strong>\u30dd\u30a4\u30f3\u30c8<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>UserDTO<\/code> \u306f\u3001<strong>\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u5c64\u3068\u30d7\u30ec\u30bc\u30f3\u30c6\u30fc\u30b7\u30e7\u30f3\u5c64\u306e\u30c7\u30fc\u30bf\u306e\u3084\u308a\u53d6\u308a<\/strong> \u306b\u4f7f\u3046\u3002<\/li>\n\n\n\n<li>\u914d\u5217\u3067\u306f\u306a\u304f\u3001<strong>\u578b\u5b89\u5168\u306a\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3068\u3057\u3066\u6271\u3048\u308b<\/strong>\u3002<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>(2) \u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u306e\u4f5c\u6210<\/strong><\/h4>\n\n\n\n<p>\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u306f\u3001<strong>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u52d5\u4f5c\u30d5\u30ed\u30fc\u3092\u5b9a\u7fa9\u3059\u308b<\/strong> \u5f79\u5272\u3092\u6301\u3061\u307e\u3059\u3002<br>\u4f8b\u3048\u3070\u3001\u300c\u30e6\u30fc\u30b6\u30fc\u3092\u4f5c\u6210\u3059\u308b\u300d\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u3092\u4f5c\u6210\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<p>\ud83d\udccc <code>app\/Application\/UseCases\/CreateUserUseCase.php<\/code><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>namespace App\\Application\\UseCases;\n\nuse App\\Domain\\Entities\\User;\nuse App\\Domain\\Services\\UserDomainService;\nuse App\\Domain\\Repositories\\UserRepositoryInterface;\nuse App\\Application\\DTOs\\UserDTO;\n\nclass CreateUserUseCase\n{\n    private UserRepositoryInterface $userRepository;\n    private UserDomainService $userDomainService;\n\n    public function __construct(\n        UserRepositoryInterface $userRepository,\n        UserDomainService $userDomainService\n    ) {\n        $this-&gt;userRepository = $userRepository;\n        $this-&gt;userDomainService = $userDomainService;\n    }\n\n    public function execute(UserDTO $userDTO): User\n    {\n        \/\/ \u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306e\u91cd\u8907\u30c1\u30a7\u30c3\u30af\n        if ($this-&gt;userDomainService-&gt;isEmailAlreadyTaken(new \\App\\Domain\\ValueObjects\\Email($userDTO-&gt;email))) {\n            throw new \\Exception(&quot;This email is already taken.&quot;);\n        }\n\n        \/\/ \u30e6\u30fc\u30b6\u30fc\u4f5c\u6210\n        $user = new User(0, $userDTO-&gt;name, $userDTO-&gt;email);\n\n        \/\/ \u6c38\u7d9a\u5316\n        $this-&gt;userRepository-&gt;save($user);\n\n        return $user;\n    }\n}<\/code><\/pre><\/div>\n\n\n\n<p>\ud83d\udc49 <strong>\u30dd\u30a4\u30f3\u30c8<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u5185\u3067\u30d3\u30b8\u30cd\u30b9\u30ed\u30b8\u30c3\u30af\u3092\u66f8\u304b\u305a\u3001\u30c9\u30e1\u30a4\u30f3\u5c64\u306e\u30b5\u30fc\u30d3\u30b9\u3092\u5229\u7528\u3059\u308b<\/strong>\u3002<\/li>\n\n\n\n<li>\u4f9d\u5b58\u3059\u308b\u30ea\u30dd\u30b8\u30c8\u30ea\u3084\u30b5\u30fc\u30d3\u30b9\u3092\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u3067\u6ce8\u5165\u3059\u308b\u3002<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"43_%E3%82%A4%E3%83%B3%E3%83%95%E3%83%A9%E5%B1%A4%E3%81%AE%E5%AE%9F%E8%A3%85%EF%BC%88%E3%83%AA%E3%83%9D%E3%82%B8%E3%83%88%E3%83%AA%EF%BC%89\"><\/span><strong>4.3 \u30a4\u30f3\u30d5\u30e9\u5c64\u306e\u5b9f\u88c5<\/strong>\uff08\u30ea\u30dd\u30b8\u30c8\u30ea\uff09<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u30a4\u30f3\u30d5\u30e9\u5c64\u306f\u3001<strong>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3084\u5916\u90e8\u30b5\u30fc\u30d3\u30b9\u3068\u306e\u9023\u643a\u3092\u62c5\u5f53\u3059\u308b\u5c64<\/strong> \u3067\u3059\u3002<br>\u3053\u3053\u3067\u306f\u3001<strong>\u30ea\u30dd\u30b8\u30c8\u30ea\u30d1\u30bf\u30fc\u30f3\u3092\u4f7f\u3044\u3001Eloquent\u3092\u76f4\u63a5\u64cd\u4f5c\u305b\u305a\u306b\u30c7\u30fc\u30bf\u30a2\u30af\u30bb\u30b9\u3092\u62bd\u8c61\u5316<\/strong> \u3057\u307e\u3059\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>(1) \u30ea\u30dd\u30b8\u30c8\u30ea\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u306e\u4f5c\u6210<\/strong><\/h3>\n\n\n\n<p>\u307e\u305a\u3001\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\ud83d\udccc <code>app\/Domain\/Repositories\/UserRepositoryInterface.php<\/code><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>namespace App\\Domain\\Repositories;\n\nuse App\\Domain\\Entities\\User;\nuse App\\Domain\\ValueObjects\\Email;\n\ninterface UserRepositoryInterface\n{\n    public function findByEmail(Email $email): ?User;\n    public function save(User $user): void;\n}<\/code><\/pre><\/div>\n\n\n\n<p>\ud83d\udc49 <strong>\u30dd\u30a4\u30f3\u30c8<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>findByEmail()<\/code> \u306f <code>Email<\/code> \u5024\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u5f15\u6570\u306b\u53d6\u308a\u3001<code>User<\/code> \u30a8\u30f3\u30c6\u30a3\u30c6\u30a3\u3092\u8fd4\u3059\u3002<\/li>\n\n\n\n<li><code>save()<\/code> \u30e1\u30bd\u30c3\u30c9\u306f <code>User<\/code> \u30a8\u30f3\u30c6\u30a3\u30c6\u30a3\u3092\u4fdd\u5b58\u3059\u308b\u304c\u3001<strong>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u8a73\u7d30\u306f\u96a0\u853d<\/strong> \u3059\u308b\u3002<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>(2) Eloquent\u3092\u4f7f\u3063\u305f\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u5b9f\u88c5<\/strong><\/h3>\n\n\n\n<p>\u30a4\u30f3\u30d5\u30e9\u5c64\u3067 <strong>Eloquent\u3092\u4f7f\u3063\u305f\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u5b9f\u88c5<\/strong> \u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\ud83d\udccc <code>app\/Infrastructure\/Persistence\/UserEloquentRepository.php<\/code><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>namespace App\\Infrastructure\\Persistence;\n\nuse App\\Domain\\Repositories\\UserRepositoryInterface;\nuse App\\Domain\\Entities\\User;\nuse App\\Domain\\ValueObjects\\Email;\nuse App\\Models\\User as EloquentUser;\n\nclass UserEloquentRepository implements UserRepositoryInterface\n{\n    public function findByEmail(Email $email): ?User\n    {\n        $user = EloquentUser::where(&#39;email&#39;, $email-&gt;getValue())-&gt;first();\n        if (!$user) {\n            return null;\n        }\n\n        return new User($user-&gt;id, $user-&gt;name, $user-&gt;email);\n    }\n\n    public function save(User $user): void\n    {\n        EloquentUser::updateOrCreate(\n            [&#39;id&#39; =&gt; $user-&gt;getId()],\n            [&#39;name&#39; =&gt; $user-&gt;getName(), &#39;email&#39; =&gt; $user-&gt;getEmail()]\n        );\n    }\n}<\/code><\/pre><\/div>\n\n\n\n<p>\ud83d\udc49 <strong>\u30dd\u30a4\u30f3\u30c8<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>EloquentUser<\/code> \u3092\u76f4\u63a5\u64cd\u4f5c\u305b\u305a\u3001<code>User<\/code> \u30a8\u30f3\u30c6\u30a3\u30c6\u30a3\u3068\u3057\u3066\u6271\u3046\u3002<\/li>\n\n\n\n<li><code>findByEmail()<\/code> \u30e1\u30bd\u30c3\u30c9\u3067\u306f\u3001<strong>\u30a8\u30f3\u30c6\u30a3\u30c6\u30a3\u3092\u8fd4\u3059\u3053\u3068\u3067\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u8a73\u7d30\u3092\u96a0\u853d<\/strong> \u3059\u308b\u3002<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"44_%E3%83%97%E3%83%AC%E3%82%BC%E3%83%B3%E3%83%86%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3%E5%B1%A4%E3%81%AE%E5%AE%9F%E8%A3%85%EF%BC%88%E3%82%B3%E3%83%B3%E3%83%88%E3%83%AD%E3%83%BC%E3%83%A9%E3%83%BC%EF%BC%89\"><\/span><strong>4.4 \u30d7\u30ec\u30bc\u30f3\u30c6\u30fc\u30b7\u30e7\u30f3\u5c64\u306e\u5b9f\u88c5<\/strong>\uff08\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\uff09<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u30d7\u30ec\u30bc\u30f3\u30c6\u30fc\u30b7\u30e7\u30f3\u5c64\u3067\u306f\u3001<strong>\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u53d7\u3051\u53d6\u308a\u3001\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u3092\u5b9f\u884c\u3057\u3001\u30ec\u30b9\u30dd\u30f3\u30b9\u3092\u8fd4\u3059\u5f79\u5272<\/strong> \u3092\u6301\u3061\u307e\u3059\u3002<br>\u3053\u3053\u3067\u306f\u3001<strong>\u30e6\u30fc\u30b6\u30fc\u4f5c\u6210API<\/strong> \u3092\u5b9f\u88c5\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>(1) \u30ea\u30af\u30a8\u30b9\u30c8\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u306e\u4f5c\u6210<\/strong><\/h3>\n\n\n\n<p>\u307e\u305a\u3001\u30ea\u30af\u30a8\u30b9\u30c8\u306e\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u3092\u884c\u3046 <code>FormRequest<\/code> \u30af\u30e9\u30b9\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\ud83d\udccc <code>app\/Http\/Requests\/CreateUserRequest.php<\/code><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>namespace App\\Http\\Requests;\n\nuse Illuminate\\Foundation\\Http\\FormRequest;\n\nclass CreateUserRequest extends FormRequest\n{\n    public function rules(): array\n    {\n        return [\n            &#39;name&#39; =&gt; &#39;required|string|max:255&#39;,\n            &#39;email&#39; =&gt; &#39;required|email|unique:users,email&#39;,\n        ];\n    }\n}<\/code><\/pre><\/div>\n\n\n\n<p>\ud83d\udc49 <strong>\u30dd\u30a4\u30f3\u30c8<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u30ea\u30af\u30a8\u30b9\u30c8\u306e\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u3092\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u304b\u3089\u5206\u96e2<\/strong> \u3057\u3001\u5f79\u5272\u3092\u660e\u78ba\u306b\u3059\u308b\u3002<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>(2) \u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306e\u5b9f\u88c5<\/strong><\/h3>\n\n\n\n<p>\u6b21\u306b\u3001\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3067 <code>CreateUserUseCase<\/code> \u3092\u547c\u3073\u51fa\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\ud83d\udccc <code>app\/Http\/Controllers\/UserController.php<\/code><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>namespace App\\Http\\Controllers;\n\nuse App\\Application\\UseCases\\CreateUserUseCase;\nuse App\\Application\\DTOs\\UserDTO;\nuse App\\Http\\Requests\\CreateUserRequest;\nuse Illuminate\\Http\\JsonResponse;\n\nclass UserController extends Controller\n{\n    private CreateUserUseCase $createUserUseCase;\n\n    public function __construct(CreateUserUseCase $createUserUseCase)\n    {\n        $this-&gt;createUserUseCase = $createUserUseCase;\n    }\n\n    public function store(CreateUserRequest $request): JsonResponse\n    {\n        $userDTO = new UserDTO($request-&gt;name, $request-&gt;email);\n        $user = $this-&gt;createUserUseCase-&gt;execute($userDTO);\n\n        return response()-&gt;json([\n            &#39;id&#39; =&gt; $user-&gt;getId(),\n            &#39;name&#39; =&gt; $user-&gt;getName(),\n            &#39;email&#39; =&gt; $user-&gt;getEmail(),\n        ], 201);\n    }\n}<\/code><\/pre><\/div>\n\n\n\n<p>\ud83d\udc49 <strong>\u30dd\u30a4\u30f3\u30c8<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>CreateUserUseCase<\/code> \u3092\u5229\u7528\u3057\u3001\u30d3\u30b8\u30cd\u30b9\u30ed\u30b8\u30c3\u30af\u3092 <strong>\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306b\u66f8\u304b\u306a\u3044<\/strong>\u3002<\/li>\n\n\n\n<li>\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u306b <code>UserDTO<\/code> \u3092\u6e21\u3057\u3001\u30c7\u30fc\u30bf\u306e\u53d7\u3051\u6e21\u3057\u3092\u660e\u78ba\u306b\u3059\u308b\u3002<\/li>\n\n\n\n<li><code>JsonResponse<\/code> \u3067API\u30ec\u30b9\u30dd\u30f3\u30b9\u3092\u8fd4\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>(3) \u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u306e\u8a2d\u5b9a<\/strong><\/h3>\n\n\n\n<p>\u6700\u5f8c\u306b\u3001\u30eb\u30fc\u30c8\u3092\u8a2d\u5b9a\u3057\u3066\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3092\u6709\u52b9\u306b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\ud83d\udccc <code>routes\/api.php<\/code><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>use App\\Http\\Controllers\\UserController;\nuse Illuminate\\Support\\Facades\\Route;\n\nRoute::post(&#39;\/users&#39;, [UserController::class, &#39;store&#39;]);<\/code><\/pre><\/div>\n\n\n\n<p>\ud83d\udc49 <strong>\u30dd\u30a4\u30f3\u30c8<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>\/api\/users<\/code> \u306b <code>POST<\/code> \u30ea\u30af\u30a8\u30b9\u30c8\u3092\u9001\u308b\u3068\u3001\u30e6\u30fc\u30b6\u30fc\u304c\u4f5c\u6210\u3055\u308c\u308b\u3002<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E3%81%BE%E3%81%A8%E3%82%81\"><\/span><strong>\u307e\u3068\u3081<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u2714\ufe0f \u3053\u306e\u8a18\u4e8b\u3067\u5b66\u3093\u3060\u3053\u3068<\/strong><\/h3>\n\n\n\n<p>\u2705 DDD\u3068\u30af\u30ea\u30fc\u30f3\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306e\u9055\u3044\u3068\u5171\u901a\u70b9<br>\u2705 Laravel\u306b\u9069\u7528\u3059\u308b\u305f\u3081\u306e\u30d5\u30a9\u30eb\u30c0\u69cb\u6210<br>\u2705 \u5404\u5c64\uff08\u30c9\u30e1\u30a4\u30f3\u30fb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30fb\u30a4\u30f3\u30d5\u30e9\u30fb\u30d7\u30ec\u30bc\u30f3\u30c6\u30fc\u30b7\u30e7\u30f3\uff09\u306e\u5b9f\u88c5\u65b9\u6cd5<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u2714\ufe0f DDD\u00d7\u30af\u30ea\u30fc\u30f3\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u3092\u63a1\u7528\u3059\u3079\u304d\u30b1\u30fc\u30b9<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u5927\u898f\u6a21\u306a\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067\u3001\u5909\u66f4\u3084\u62e1\u5f35\u304c\u983b\u7e41\u306b\u767a\u751f\u3059\u308b\u5834\u5408<\/strong><\/li>\n\n\n\n<li><strong>\u30d3\u30b8\u30cd\u30b9\u30eb\u30fc\u30eb\u304c\u8907\u96d1\u3067\u3001\u30c9\u30e1\u30a4\u30f3\u77e5\u8b58\u3092\u6574\u7406\u3057\u305f\u3044\u5834\u5408<\/strong><\/li>\n\n\n\n<li><strong>\u30c6\u30b9\u30c8\u306e\u3057\u3084\u3059\u3055\u3084\u4fdd\u5b88\u6027\u3092\u5411\u4e0a\u3055\u305b\u305f\u3044\u5834\u5408<\/strong><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u2714\ufe0f Laravel\u3067DDD\u3092\u5c0e\u5165\u3059\u308b\u969b\u306e\u6ce8\u610f\u70b9<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u5c0f\u898f\u6a21\u306a\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u306f\u30aa\u30fc\u30d0\u30fc\u30a8\u30f3\u30b8\u30cb\u30a2\u30ea\u30f3\u30b0\u306b\u306a\u308a\u3084\u3059\u3044<\/strong><\/li>\n\n\n\n<li><strong>\u958b\u767a\u30c1\u30fc\u30e0\u304cDDD\u306e\u6982\u5ff5\u3092\u7406\u89e3\u3057\u3066\u3044\u306a\u3044\u3068\u9006\u306b\u8907\u96d1\u5316\u3059\u308b<\/strong><\/li>\n\n\n\n<li><strong>\u30e1\u30ea\u30c3\u30c8\u3092\u6d3b\u304b\u3059\u305f\u3081\u306b\u306f\u3001\u9069\u5207\u306a\u8a2d\u8a08\u3068\u30eb\u30fc\u30eb\u3092\u5b88\u308b\u3053\u3068\u304c\u91cd\u8981<\/strong><\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%F0%9F%9A%80_%E6%AC%A1%E3%81%AE%E3%82%B9%E3%83%86%E3%83%83%E3%83%97\"><\/span><strong>\ud83d\ude80 \u6b21\u306e\u30b9\u30c6\u30c3\u30d7<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u3053\u306e\u8a18\u4e8b\u3092\u3082\u3068\u306b\u3001<strong>\u5b9f\u969b\u306bLaravel\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306bDDD\u00d7\u30af\u30ea\u30fc\u30f3\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u3092\u5c0e\u5165<\/strong> \u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. \u306f\u3058\u3081\u306b Laravel \u00d7 DDD \u00d7 \u30af\u30ea\u30fc\u30f3\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u3068\u306f\uff1f Laravel\u306f\u3001\u30b7\u30f3\u30d7\u30eb\u306aMVC\uff08Model-View-Controller\uff09\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u3092\u63a1\u7528\u3057\u3066\u304a\u308a\u3001\u76f4\u611f\u7684\u306b\u958b\u767a\u304c\u3067\u304d\u308b\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":222,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"sns_share_botton_hide":"","vkExUnit_sns_title":"","_vk_print_noindex":"","sitemap_hide":"","_veu_custom_css":"","veu_display_promotion_alert":"common","vkexunit_cta_each_option":"","_lightning_design_setting":{"layout":"default"},"footnotes":""},"categories":[9,8,6],"tags":[],"class_list":["post-221","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-laravel","category-php","category-app_development"],"veu_head_title_object":{"title":"","add_site_title":""},"_links":{"self":[{"href":"https:\/\/hexis.jp\/index.php?rest_route=\/wp\/v2\/posts\/221","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hexis.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hexis.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hexis.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hexis.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=221"}],"version-history":[{"count":1,"href":"https:\/\/hexis.jp\/index.php?rest_route=\/wp\/v2\/posts\/221\/revisions"}],"predecessor-version":[{"id":223,"href":"https:\/\/hexis.jp\/index.php?rest_route=\/wp\/v2\/posts\/221\/revisions\/223"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hexis.jp\/index.php?rest_route=\/wp\/v2\/media\/222"}],"wp:attachment":[{"href":"https:\/\/hexis.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=221"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hexis.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=221"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hexis.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=221"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}