{"id":31302,"date":"2017-08-29T10:41:55","date_gmt":"2017-08-29T01:41:55","guid":{"rendered":"http:\/\/www.sejuku.net\/blog\/?p=31302"},"modified":"2024-05-06T11:44:46","modified_gmt":"2024-05-06T02:44:46","slug":"%e3%80%90cakephp%e5%85%a5%e9%96%80%e3%80%91%e3%82%a2%e3%82%bd%e3%82%b7%e3%82%a8%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9%e3%82%92%e3%83%9e%e3%82%b9%e3%82%bf%e3%83%bc","status":"publish","type":"post","link":"https:\/\/www.sejuku.net\/blog\/31302","title":{"rendered":"\u3010CakePHP\u5165\u9580\u3011\u30a2\u30bd\u30b7\u30a8\u30fc\u30b7\u30e7\u30f3\u306e\u4f7f\u3044\u65b9\u3092\u30de\u30b9\u30bf\u30fc\u3057\u3088\u3046\uff01"},"content":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\uff01\u30d5\u30ea\u30fc\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u305b\u304d\u3067\u3059\u3002<\/p>\n<p>CakePHP\u3067\u306f\u3001\u30e2\u30c7\u30eb\u306b\u30e2\u30c7\u30eb\u540c\u58eb\u306e\u95a2\u9023\u3092\u5b9a\u7fa9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001<\/p>\n<p><span style=\"color: #ff0000\"><strong>\u30fb\u30a2\u30bd\u30b7\u30a8\u30fc\u30b7\u30e7\u30f3\u3068\u306f\u4f55\u304b\u77e5\u308a\u305f\u3044<br \/>\n\u30fb\u30a2\u30bd\u30b7\u30a8\u30fc\u30b7\u30e7\u30f3\u306e\u7a2e\u5225\u3054\u3068\u306e\u4f7f\u3044\u65b9\u3092\u77e5\u308a\u305f\u3044<\/strong><\/span><\/p>\n<p>\u3068\u3044\u3063\u305f\u5185\u5bb9\u306b\u3064\u3044\u3066\u3001\u308f\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3057\u307e\u3059\uff01<\/p>\n<h2>\u30a2\u30bd\u30b7\u30a8\u30fc\u30b7\u30e7\u30f3\u3068\u306f<\/h2>\n<p>CakePHP\u3067\u306f\u3001<span style=\"color: #0000ff\"><strong>\u30e2\u30c7\u30eb\u540c\u58eb\u306e\u95a2\u9023<\/strong><\/span>\u3092<span style=\"color: #339966\"><strong>\u30a2\u30bd\u30b7\u30a8\u30fc\u30b7\u30e7\u30f3<\/strong><\/span>\u3068\u3044\u3044\u307e\u3059\u3002<\/p>\n<p>\u30a2\u30bd\u30b7\u30a8\u30fc\u30b7\u30e7\u30f3\u3092\u4f7f\u3046\u3053\u3068\u3067\u3001\u4e00\u5ea6\u306e\u51e6\u7406\u3067\u95a2\u9023\u3059\u308b\u8907\u6570\u306e\u30e2\u30c7\u30eb\u304b\u3089\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3057\u305f\u308a\u3001\u4fdd\u5b58\u3057\u305f\u308a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u30a2\u30bd\u30b7\u30a8\u30fc\u30b7\u30e7\u30f3\u306b\u306f<span style=\"color: #ff0000;background-color: #ffff99\"><strong>4\u3064\u306e\u7a2e\u985e<\/strong><\/span>\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u6b21\u306e\u7ae0\u304b\u3089\u3001\u305d\u308c\u305e\u308c\u306e\u30a2\u30bd\u30b7\u30a8\u30fc\u30b7\u30e7\u30f3\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<h2>\u30a2\u30bd\u30b7\u30a8\u30fc\u30b7\u30e7\u30f3\u306e\u4f7f\u3044\u65b9<\/h2>\n<h3>hasOne<\/h3>\n<p><span style=\"color: #339966\"><strong>hasOne<\/strong><\/span>\u306f\u300c<span style=\"color: #ff0000\"><strong>\uff11\u5bfe\uff11<\/strong><\/span>\u300d\u306e\u95a2\u9023\u3092\u8868\u3057\u307e\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u30011\u4eba\u306e\u9867\u5ba2\u306f1\u3064\u306e\u751f\u5e74\u6708\u65e5\u3092\u6301\u3061\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u6642\u3001<span style=\"color: #0000ff\"><strong>\u9867\u5ba2\u3068\u751f\u5e74\u6708\u65e5\u306f\u300c\uff11\u5bfe\uff11\u300d\u306e\u95a2\u4fc2<\/strong><\/span>\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u7ae0\u3067\u306f\u3001\u9867\u5ba2\u30c6\u30fc\u30d6\u30eb\u3068\u751f\u5e74\u6708\u65e5\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210\u3057\u3001hasOne\u306e\u95a2\u4fc2\u306b\u306a\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210\u3057\u3001\u30c7\u30fc\u30bf\u3092\u767b\u9332\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<p><strong>\u9867\u5ba2\u30c6\u30fc\u30d6\u30eb\u306e\u30c6\u30fc\u30d6\u30eb\u5b9a\u7fa9<\/strong><\/p>\n<pre class=\"decode:true \">\r\ncreate table users\r\n(\r\n\tid int not null auto_increment, -- ID\r\n\tname varchar(32), -- \u540d\u524d\r\n \tprimary key (id)\r\n);\r\n<\/pre>\n<p><strong>\u9867\u5ba2\u30c6\u30fc\u30d6\u30eb\u306e\u521d\u671f\u30c7\u30fc\u30bf<\/strong><br \/>\n\n<table id=\"tablepress-147\" class=\"tablepress tablepress-id-147\">\n<thead>\n<tr class=\"row-1\">\n\t<th class=\"column-1\">id<\/th><th class=\"column-2\">name<\/th>\n<\/tr>\n<\/thead>\n<tbody class=\"row-striping row-hover\">\n<tr class=\"row-2\">\n\t<td class=\"column-1\">1<\/td><td class=\"column-2\">\u5c0f\u6797<\/td>\n<\/tr>\n<tr class=\"row-3\">\n\t<td class=\"column-1\">2<\/td><td class=\"column-2\">\u7530\u4e2d<\/td>\n<\/tr>\n<tr class=\"row-4\">\n\t<td class=\"column-1\">3<\/td><td class=\"column-2\">\u5c0f\u6ca2<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<!-- #tablepress-147 from cache --><\/p>\n<p><strong>\u751f\u5e74\u6708\u65e5\u30c6\u30fc\u30d6\u30eb\u306e\u30c6\u30fc\u30d6\u30eb\u5b9a\u7fa9<\/strong><\/p>\n<pre class=\"decode:true \">\r\ncreate table user_birthdays\r\n(\r\n\tid int not null auto_increment,  -- ID\r\n\tuser_id int not null,  -- \u30e6\u30fc\u30b6ID\r\n\tyear int, -- \u5e74\r\n    month int, -- \u6708\r\n    day int, -- \u65e5\r\n\tprimary key (id)\r\n);\r\n<\/pre>\n<p>\u751f\u5e74\u6708\u65e5\u30c6\u30fc\u30d6\u30eb\u306f<span style=\"color: #0000ff\"><strong>\u9867\u5ba2\u30c6\u30fc\u30d6\u30eb\u3092\u53c2\u7167\u3059\u308b<\/strong><\/span><span style=\"color: #339966\"><strong>\u5916\u90e8\u30ad\u30fc<\/strong><\/span>user_id\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u6301\u3061\u307e\u3059\u3002<\/p>\n<p>\u5916\u90e8\u30ad\u30fc\u306f\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u300c<span style=\"color: #0000ff\"><strong>\u76f8\u624b\u5074\u306e\u30e2\u30c7\u30eb\u540d(\u5358\u6570\u5f62)_id<\/strong><\/span>\u300d\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<p><strong>\u751f\u5e74\u6708\u65e5\u30c6\u30fc\u30d6\u30eb\u306e\u521d\u671f\u30c7\u30fc\u30bf<\/strong><br \/>\n\n<table id=\"tablepress-148\" class=\"tablepress tablepress-id-148\">\n<thead>\n<tr class=\"row-1\">\n\t<th class=\"column-1\">id<\/th><th class=\"column-2\">user_id<\/th><th class=\"column-3\">year<\/th><th class=\"column-4\">month<\/th><th class=\"column-5\">day<\/th>\n<\/tr>\n<\/thead>\n<tbody class=\"row-striping row-hover\">\n<tr class=\"row-2\">\n\t<td class=\"column-1\">1<\/td><td class=\"column-2\">1<\/td><td class=\"column-3\">1970<\/td><td class=\"column-4\">3<\/td><td class=\"column-5\">5<\/td>\n<\/tr>\n<tr class=\"row-3\">\n\t<td class=\"column-1\">2<\/td><td class=\"column-2\">2<\/td><td class=\"column-3\">1975<\/td><td class=\"column-4\">10<\/td><td class=\"column-5\">10<\/td>\n<\/tr>\n<tr class=\"row-4\">\n\t<td class=\"column-1\">3<\/td><td class=\"column-2\">3<\/td><td class=\"column-3\">1965<\/td><td class=\"column-4\">2<\/td><td class=\"column-5\">28<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<!-- #tablepress-148 from cache --><\/p>\n<p>\u305d\u308c\u305e\u308c\u306e<span style=\"color: #339966\"><strong>Model<\/strong><\/span>\u3092\u4f5c\u6210\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<p><strong>\u9867\u5ba2\u30c6\u30fc\u30d6\u30eb\u306eModel<\/strong><\/p>\n<p>src\\Model\\Entity\\User.php<\/p>\n<pre class=\"decode:true \">\r\n&lt;?php\r\nnamespace App\\Model\\Entity;\r\n\r\nuse Cake\\ORM\\Entity;\r\n\r\nclass User extends Entity\r\n{\r\n}\r\n<\/pre>\n<p>src\\Model\\Table\\UsersTable.php<\/p>\n<pre class=\"decode:true \">\r\n&lt;?php\r\nnamespace App\\Model\\Table;\r\n\r\nuse Cake\\ORM\\Table;\r\n\r\nclass UsersTable extends Table\r\n{\r\n}\r\n<\/pre>\n<p><strong>\u751f\u5e74\u6708\u65e5\u30c6\u30fc\u30d6\u30eb\u306eModel<\/strong><\/p>\n<p>src\\Model\\Entity\\UserBirthday.php<\/p>\n<pre class=\"decode:true \">\r\n&lt;?php\r\nnamespace App\\Model\\Entity;\r\n\r\nuse Cake\\ORM\\Entity;\r\n\r\nclass UserBirthday extends Entity\r\n{\r\n}\r\n<\/pre>\n<p>src\\Model\\Table\\UserBirthdaysTable.php<\/p>\n<pre class=\"decode:true \">\r\n&lt;?php\r\nnamespace App\\Model\\Table;\r\n\r\nuse Cake\\ORM\\Table;\r\n\r\nclass UserBirthdaysTable extends Table\r\n{\r\n}\r\n<\/pre>\n<p>hasOne\u30a2\u30bd\u30b7\u30a8\u30fc\u30b7\u30e7\u30f3\u306f\u3001<span style=\"color: #0000ff\"><strong>Table\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306einitialize()<\/strong><\/span>\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5b9a\u7fa9\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"decode:true \">\r\n$this-&gt;hasOne('\u30e2\u30c7\u30eb\u540d');\r\n<\/pre>\n<p>UsersTable\u306b\u3001initialize()\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"decode:true \">\r\n    public function initialize(array $config)\r\n    {\r\n        $this-&gt;hasOne('UserBirthdays');\r\n    }\r\n<\/pre>\n<p>\u3053\u306e\u3088\u3046\u306b\u5b9a\u7fa9\u3057\u3066\u304a\u304f\u3068\u3001Users\u306e<span style=\"color: #0000ff\"><strong>Controller\u3067contain\u3092\u4f7f\u7528<\/strong><\/span>\u3057\u3001UserBirthdays\u306e\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><span style=\"color: #339966\"><strong>bake<\/strong><\/span>\u3067<span style=\"color: #339966\"><strong>Controller<\/strong><\/span>\u306e\u96db\u5f62\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"decode:true \">\r\nbin\/cake bake controller users\r\n<\/pre>\n<p>bake\u306b\u3064\u3044\u3066\u306f\u3001\u4ee5\u4e0b\u306e\u8a18\u4e8b\u3067\u8a73\u3057\u304f\u89e3\u8aac\u3057\u3066\u3044\u307e\u3059\uff01<br \/>\n            <a href=\"https:\/\/www.sejuku.net\/blog\/26423\" class=\"blog-card-anchor\">\n                <div class=\"blog-card\">\n                <div class=\"blog-card-content\">\n                    <div class=\"blog-card-thumbnail\">\n                    <img decoding=\"async\" class=\"blog-card-thumbnail-img\" src=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/07\/image2-150x86.jpg\">\n                    <\/div>\n                    <div class=\"blog-card-title-wrap\">\n                    <div class=\"blog-card-title\">\u3010CakePHP\u5165\u9580\u3011bake\u306e\u4f7f\u3044\u65b9<\/div>\n                    <div class=\"blog-card-update-date\">\u66f4\u65b0\u65e5\uff1a2024\u5e745\u67086\u65e5<\/div>\n                    <\/div>\n                <\/div>\n                <\/div>\n            <\/a>\n            <\/p>\n<p>\u4f5c\u6210\u3055\u308c\u305f\u300csrc\\Controller\\UsersController.php\u300d\u306eindex\u30e1\u30bd\u30c3\u30c9\u3092\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u4fee\u6b63\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"decode:true \">\r\n    public function index()\r\n    {\r\n\t\t$query = $this-&gt;Users-&gt;find('all')-&gt;contain(['UserBirthdays']);\r\n\t\t$this-&gt;set('users', $query);\r\n    }\r\n<\/pre>\n<p>\u300cfind(&#8216;all&#8217;)\u300d\u3067\u5168\u4ef6\u691c\u7d22\u3057\u3001<span style=\"color: #0000ff\"><strong>\u300ccontain(&#8216;UserBirthdays&#8217;)\u300d\u3067UserBirthdays\u306e\u30c7\u30fc\u30bf\u3082\u4e00\u7dd2\u306b\u53d6\u5f97<\/strong><\/span>\u3059\u308b\u3088\u3046\u306b\u6307\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u4e00\u89a7\u8868\u793a\u306e<span style=\"color: #339966\"><strong>Template<\/strong><\/span>\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<p>src\\Template\\Users\\index.ctp<\/p>\n<pre class=\"decode:true \">\r\n&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;\r\n    &lt;thead&gt;\r\n        &lt;tr&gt;\r\n            &lt;th&gt;ID&lt;\/th&gt;\r\n            &lt;th&gt;\u540d\u524d&lt;\/th&gt;\r\n            &lt;th&gt;\u751f\u5e74\u6708\u65e5&lt;\/th&gt;\r\n        &lt;\/tr&gt;\r\n    &lt;\/thead&gt;\r\n    &lt;tbody&gt;\r\n        &lt;?php foreach ($users as $user): ?&gt;\r\n        &lt;tr&gt;\r\n            &lt;td&gt;&lt;?= $user-&gt;id ?&gt;&lt;\/td&gt;\r\n            &lt;td&gt;&lt;?= $user-&gt;name ?&gt;&lt;\/td&gt;\r\n\t\t\t&lt;td&gt;&lt;?= $user-&gt;user_birthday-&gt;year ?&gt;\/&lt;?= $user-&gt;user_birthday-&gt;month ?&gt;\/&lt;?= $user-&gt;user_birthday-&gt;day ?&gt;&lt;\/td&gt;\r\n        &lt;\/tr&gt;\r\n        &lt;?php endforeach; ?&gt;\r\n    &lt;\/tbody&gt;\r\n&lt;\/table&gt;\r\n<\/pre>\n<p>UserBirthdays\u306e\u30c7\u30fc\u30bf\u306f\u300c<span style=\"color: #0000ff\"><strong>$user-&gt;user_birthday<\/strong><\/span>\u300d\u3067\u53d6\u5f97\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u8868\u793a\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<p>http:\/\/[\u30b5\u30fc\u30d0\u540d]\/[\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u540d]\/users\/<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/hasone-640x223.png\" alt=\"hasone\" width=\"640\" height=\"223\" class=\"alignnone size-large wp-image-31304\" srcset=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/hasone-640x223.png 640w, https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/hasone-150x52.png 150w, https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/hasone-300x105.png 300w, https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/hasone.png 780w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>UserBirthdays\u306e\u30c7\u30fc\u30bf\u3082\u53d6\u5f97\u3067\u304d\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3>hasMany<\/h3>\n<p><span style=\"color: #339966\"><strong>hasMany<\/strong><\/span>\u306f\u300c<span style=\"color: #ff0000\"><strong>\uff11\u5bfe\u591a<\/strong><\/span>\u300d\u306e\u95a2\u9023\u3092\u8868\u3057\u307e\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u30011\u4eba\u306e\u9867\u5ba2\u304c\u8907\u6570\u306e\u6ce8\u6587\u30c7\u30fc\u30bf\u3092\u6301\u3064\u3053\u3068\u304c\u3067\u304d\u308b\u306e\u3067\u3001<span style=\"color: #0000ff\"><strong>\u9867\u5ba2\u3068\u6ce8\u6587\u306f\u300c\uff11\u5bfe\u591a\u300d\u306e\u95a2\u4fc2<\/strong><\/span>\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>hasMany\u306b\u3064\u3044\u3066\u306f\u3001\u4ee5\u4e0b\u306e\u8a18\u4e8b\u3067\u8a73\u3057\u304f\u89e3\u8aac\u3057\u3066\u3044\u307e\u3059\uff01<br \/>\n            <a href=\"https:\/\/www.sejuku.net\/blog\/29221\" class=\"blog-card-anchor\">\n                <div class=\"blog-card\">\n                <div class=\"blog-card-content\">\n                    <div class=\"blog-card-thumbnail\">\n                    <img decoding=\"async\" class=\"blog-card-thumbnail-img\" src=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/image4-150x86.jpg\">\n                    <\/div>\n                    <div class=\"blog-card-title-wrap\">\n                    <div class=\"blog-card-title\">\u3010CakePHP\u5165\u9580\u3011\u30a2\u30bd\u30b7\u30a8\u30fc\u30b7\u30e7\u30f3\u306ehasMany\u306e\u4f7f\u3044\u65b9\u3092\u7406\u89e3\u3057\u3088\u3046\uff01<\/div>\n                    <div class=\"blog-card-update-date\">\u66f4\u65b0\u65e5\uff1a2024\u5e745\u67086\u65e5<\/div>\n                    <\/div>\n                <\/div>\n                <\/div>\n            <\/a>\n            <\/p>\n<h3>belongsTo<\/h3>\n<p><span style=\"color: #339966\"><strong>belongsTo<\/strong><\/span>\u306f\u300c<span style=\"color: #ff0000\"><strong>\u591a\u5bfe\uff11<\/strong><\/span>\u300d\u306e\u95a2\u9023\u3092\u8868\u3057\u307e\u3059\u3002<\/p>\n<p>hasMany\u306e\u7ae0\u3067\u3001\u9867\u5ba2\u3068\u6ce8\u6587\u306f\u300c\uff11\u5bfe\u591a\u300d\u306e\u95a2\u4fc2\u306b\u306a\u308b\u3068\u89e3\u8aac\u3057\u307e\u3057\u305f\u304c\u3001belongsTo\u306f\u305d\u306e\u9006\u3067\u3001<span style=\"color: #0000ff\"><strong>\u6ce8\u6587\u3068\u9867\u5ba2\u306f\u300c\u591a\u5bfe\uff11\u300d\u306e\u95a2\u4fc2<\/strong><\/span>\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>belongsTo\u306b\u3064\u3044\u3066\u306f\u3001\u4ee5\u4e0b\u306e\u8a18\u4e8b\u3067\u8a73\u3057\u304f\u89e3\u8aac\u3057\u3066\u3044\u307e\u3059\uff01<br \/>\n            <a href=\"https:\/\/www.sejuku.net\/blog\/28522\" class=\"blog-card-anchor\">\n                <div class=\"blog-card\">\n                <div class=\"blog-card-content\">\n                    <div class=\"blog-card-thumbnail\">\n                    <img decoding=\"async\" class=\"blog-card-thumbnail-img\" src=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/image-150x86.jpg\">\n                    <\/div>\n                    <div class=\"blog-card-title-wrap\">\n                    <div class=\"blog-card-title\">\u3010CakePHP\u5165\u9580\u3011\u30a2\u30bd\u30b7\u30a8\u30fc\u30b7\u30e7\u30f3\u306ebelongsTo\u306e\u4f7f\u3044\u65b9\u3092\u7406\u89e3\u3057\u3088\u3046\uff01<\/div>\n                    <div class=\"blog-card-update-date\">\u66f4\u65b0\u65e5\uff1a2024\u5e745\u67086\u65e5<\/div>\n                    <\/div>\n                <\/div>\n                <\/div>\n            <\/a>\n            <\/p>\n<h3>belongsToMany<\/h3>\n<p><span style=\"color: #339966\"><strong>belongsToMany<\/strong><\/span>\u306f\u300c<span style=\"color: #ff0000\"><strong>\u591a\u5bfe\u591a<\/strong><\/span>\u300d\u306e\u95a2\u9023\u3092\u8868\u3057\u307e\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u3001\u9867\u5ba2\u306f\u8907\u6570\u306e\u5546\u54c1\u3092\u6ce8\u6587\u3057\u3001\u5546\u54c1\u306f\u8907\u6570\u306e\u9867\u5ba2\u304b\u3089\u6ce8\u6587\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u6642\u3001<span style=\"color: #0000ff\"><strong>\u9867\u5ba2\u3068\u5546\u54c1\u306f\u300c\u591a\u5bfe\u591a\u300d\u306e\u95a2\u4fc2<\/strong><\/span>\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u901a\u5e38\u3001\u591a\u5bfe\u591a\u306e\u95a2\u9023\u3092\u8868\u3059\u306b\u306f<span style=\"color: #ff0000\"><strong>\u4e2d\u9593\u30c6\u30fc\u30d6\u30eb\u3092\u4f7f\u7528<\/strong><\/span>\u3057\u307e\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306e\u4f8b\u3060\u3068\u3001\u6ce8\u6587\u306e\u30c7\u30fc\u30bf\u304c\u3042\u3063\u3066\u9867\u5ba2\u3068\u5546\u54c1\u304c\u591a\u5bfe\u591a\u306e\u95a2\u9023\u3092\u6301\u3064\u306e\u3067\u3001<span style=\"color: #0000ff\"><strong>\u6ce8\u6587\u30c6\u30fc\u30d6\u30eb\u304c\u4e2d\u9593\u30c6\u30fc\u30d6\u30eb<\/strong><\/span>\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>users\u30c6\u30fc\u30d6\u30eb\uff08\u9867\u5ba2\uff09\u3068products\u30c6\u30fc\u30d6\u30eb\uff08\u5546\u54c1\uff09\u306e\u4e2d\u9593\u30c6\u30fc\u30d6\u30eb\u306f\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f<span style=\"color: #339966\"><strong>users_products\u30c6\u30fc\u30d6\u30eb<\/strong><\/span>\u3068\u547d\u540d\u3057\u307e\u3059\u3002<\/p>\n<p>users_products\u30c6\u30fc\u30d6\u30eb\u306f\u3001<span style=\"color: #339966\"><strong>user_id\u30d5\u30a3\u30fc\u30eb\u30c9<\/strong><\/span>\u3092\u6301\u3061\u9867\u5ba2\u30c6\u30fc\u30d6\u30eb\u3068\uff11\u5bfe\u591a\u3001\u3055\u3089\u306b<span style=\"color: #339966\"><strong>product_id\u30d5\u30a3\u30fc\u30eb\u30c9<\/strong><\/span>\u3092\u6301\u3061\u5546\u54c1\u30c6\u30fc\u30d6\u30eb\u3068\u3082\uff11\u5bfe\u591a\u306e\u95a2\u4fc2\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>belongsToMany\u30a2\u30bd\u30b7\u30a8\u30fc\u30b7\u30e7\u30f3\u306f\u3001\u4ed6\u306e\u30a2\u30bd\u30b7\u30a8\u30fc\u30b7\u30e7\u30f3\u3068\u540c\u69d8\u3001<span style=\"color: #0000ff\"><strong>Table\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306einitialize()<\/strong><\/span>\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5b9a\u7fa9\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"decode:true \">\r\n$this-&gt;belongsToMany('\u30e2\u30c7\u30eb\u540d');\r\n<\/pre>\n<p>\u6b21\u306e\u3088\u3046\u306b\u3001<span style=\"color: #0000ff\"><strong>\u4e21\u65b9\u306e\u30e2\u30c7\u30eb<\/strong><\/span>\u3067belongsTo \u30a2\u30bd\u30b7\u30a8\u30fc\u30b7\u30e7\u30f3\u3092\u5b9a\u7fa9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>src\\Model\\Table\\UsersTable.php<\/p>\n<pre class=\"decode:true \">\r\n&lt;?php\r\nnamespace App\\Model\\Table;\r\n\r\nuse Cake\\ORM\\Table;\r\n\r\nclass UsersTable extends Table\r\n{\r\n    public function initialize(array $config)\r\n    {\r\n        $this-&gt;belongsToMany('Products');\r\n    }\r\n}\r\n<\/pre>\n<p>src\\Model\\Table\\ProductsTable.php<\/p>\n<pre class=\"decode:true \">\r\n&lt;?php\r\nnamespace App\\Model\\Table;\r\n\r\nuse Cake\\ORM\\Table;\r\n\r\nclass ProductsTable extends Table\r\n{\r\n    public function initialize(array $config)\r\n    {\r\n        $this-&gt;belongsToMany('Users');\r\n    }\r\n}\r\n<\/pre>\n<p>\u691c\u7d22\u3082\u4ed6\u306e\u30a2\u30bd\u30b7\u30a8\u30fc\u30b7\u30e7\u30f3\u540c\u69d8\u3001<span style=\"color: #0000ff\"><strong>Controller\u3067contain\u3092\u4f7f\u7528<\/strong><\/span>\u3057\u3001\u95a2\u9023\u30c6\u30fc\u30d6\u30eb\u306e\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"decode:true \">\r\n$query = $this-&gt;Users-&gt;find('all')-&gt;contain(['Products']);\r\n<\/pre>\n<p>CakePHP3.0\u3088\u308a\u524d\u306fbelongsToMany\u30a2\u30bd\u30b7\u30a8\u30fc\u30b7\u30e7\u30f3\u3067\u306f\u306a\u304f\u3001<span style=\"color: #339966\"><strong>hasAndBelongsToMany<\/strong><\/span>\u304c\u4f7f\u7528\u3055\u308c\u3066\u3044\u305f\u306e\u3067\u3001<span style=\"color: #ff0000\"><strong>\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044<\/strong><\/span>\u3002<\/p>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>\u4eca\u56de\u306f\u30a2\u30bd\u30b7\u30a8\u30fc\u30b7\u30e7\u30f3\u306e\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u307e\u3057\u305f\u3002<\/p>\n<p><span style=\"color: #ff0000\"><strong>\u5b9f\u969b\u306b\u30b7\u30b9\u30c6\u30e0\u7b49\u3067\u4f7f\u7528\u3055\u308c\u308b\u30c6\u30fc\u30d6\u30eb\u306b\u306f\u591a\u304f\u306e\u95a2\u9023\u304c\u5b58\u5728\u3057\u307e\u3059\u3002<\/strong><\/span><\/p>\n<p><span style=\"color: #ff0000\"><strong>\u30a2\u30bd\u30b7\u30a8\u30fc\u30b7\u30e7\u30f3\u306e\u7a2e\u5225\u3092\u3072\u3068\u3064\u305a\u3064\u899a\u3048\u3066\u3001\u305c\u3072\u30de\u30b9\u30bf\u30fc\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/strong><\/span><\/p>\n<p>\u30a2\u30bd\u30b7\u30a8\u30fc\u30b7\u30e7\u30f3\u306b\u3064\u3044\u3066\u5fd8\u308c\u3066\u3057\u307e\u3063\u305f\u3089\u3001\u3053\u306e\u8a18\u4e8b\u3092\u601d\u3044\u51fa\u3057\u3066\u4e0b\u3055\u3044\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\uff01\u30d5\u30ea\u30fc\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u305b\u304d\u3067\u3059\u3002 CakePHP\u3067\u306f\u3001\u30e2\u30c7\u30eb\u306b\u30e2\u30c7\u30eb\u540c\u58eb\u306e\u95a2\u9023\u3092\u5b9a\u7fa9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 \u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001 \u30fb\u30a2\u30bd\u30b7\u30a8\u30fc\u30b7\u30e7\u30f3\u3068\u306f\u4f55\u304b\u77e5\u308a\u305f\u3044 \u30fb\u30a2\u30bd\u30b7\u30a8\u30fc\u30b7\u30e7\u30f3\u306e\u7a2e\u5225\u3054\u3068\u306e\u4f7f\u3044\u65b9\u3092\u77e5\u308a\u305f\u3044 \u3068\u3044\u3063 [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":31303,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"swell_btn_cv_data":"","footnotes":""},"categories":[2348],"tags":[],"class_list":["post-31302","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php-study"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\u3010CakePHP\u5165\u9580\u3011\u30a2\u30bd\u30b7\u30a8\u30fc\u30b7\u30e7\u30f3\u306e\u4f7f\u3044\u65b9\u3092\u30de\u30b9\u30bf\u30fc\u3057\u3088\u3046\uff01 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0<\/title>\n<meta name=\"description\" content=\"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010CakePHP\u5165\u9580\u3011\u30a2\u30bd\u30b7\u30a8\u30fc\u30b7\u30e7\u30f3\u306e\u4f7f\u3044\u65b9\u3092\u30de\u30b9\u30bf\u30fc\u3057\u3088\u3046\uff01 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.sejuku.net\/blog\/31302\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u3010CakePHP\u5165\u9580\u3011\u30a2\u30bd\u30b7\u30a8\u30fc\u30b7\u30e7\u30f3\u306e\u4f7f\u3044\u65b9\u3092\u30de\u30b9\u30bf\u30fc\u3057\u3088\u3046\uff01 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\" \/>\n<meta property=\"og:description\" content=\"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010CakePHP\u5165\u9580\u3011\u30a2\u30bd\u30b7\u30a8\u30fc\u30b7\u30e7\u30f3\u306e\u4f7f\u3044\u65b9\u3092\u30de\u30b9\u30bf\u30fc\u3057\u3088\u3046\uff01 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sejuku.net\/blog\/31302\" \/>\n<meta property=\"og:site_name\" content=\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/sejuku2013\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/sejuku2013\/\" \/>\n<meta property=\"article:published_time\" content=\"2017-08-29T01:41:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-06T02:44:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/image25.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"700\" \/>\n\t<meta property=\"og:image:height\" content=\"400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/samuraijuku\" \/>\n<meta name=\"twitter:site\" content=\"@samuraijuku\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/31302#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/31302\"},\"author\":{\"name\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/person\\\/e8ca7fd09857a736a25e6b4455a3ab61\"},\"headline\":\"\u3010CakePHP\u5165\u9580\u3011\u30a2\u30bd\u30b7\u30a8\u30fc\u30b7\u30e7\u30f3\u306e\u4f7f\u3044\u65b9\u3092\u30de\u30b9\u30bf\u30fc\u3057\u3088\u3046\uff01\",\"datePublished\":\"2017-08-29T01:41:55+00:00\",\"dateModified\":\"2024-05-06T02:44:46+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/31302\"},\"wordCount\":135,\"publisher\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/31302#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/08\\\/image25.jpg\",\"articleSection\":[\"PHP\u5b66\u7fd2\"],\"inLanguage\":\"ja\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/31302\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/31302\",\"name\":\"\u3010CakePHP\u5165\u9580\u3011\u30a2\u30bd\u30b7\u30a8\u30fc\u30b7\u30e7\u30f3\u306e\u4f7f\u3044\u65b9\u3092\u30de\u30b9\u30bf\u30fc\u3057\u3088\u3046\uff01 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/31302#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/31302#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/08\\\/image25.jpg\",\"datePublished\":\"2017-08-29T01:41:55+00:00\",\"dateModified\":\"2024-05-06T02:44:46+00:00\",\"description\":\"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010CakePHP\u5165\u9580\u3011\u30a2\u30bd\u30b7\u30a8\u30fc\u30b7\u30e7\u30f3\u306e\u4f7f\u3044\u65b9\u3092\u30de\u30b9\u30bf\u30fc\u3057\u3088\u3046\uff01 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/31302#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/31302\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/31302#primaryimage\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/08\\\/image25.jpg\",\"contentUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/08\\\/image25.jpg\",\"width\":700,\"height\":400},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/31302#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010CakePHP\u5165\u9580\u3011\u30a2\u30bd\u30b7\u30a8\u30fc\u30b7\u30e7\u30f3\u306e\u4f7f\u3044\u65b9\u3092\u30de\u30b9\u30bf\u30fc\u3057\u3088\u3046\uff01\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/\",\"name\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\",\"description\":\"\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u5b66\u7fd2\u306e\u3059\u3079\u3066\u304c\u30b3\u30b3\u306b\u3002\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ja\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#organization\",\"name\":\"\u682a\u5f0f\u4f1a\u793eSAMURAI\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/logo.png\",\"contentUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/logo.png\",\"width\":600,\"height\":600,\"caption\":\"\u682a\u5f0f\u4f1a\u793eSAMURAI\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/sejuku2013\",\"https:\\\/\\\/x.com\\\/samuraijuku\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCCFOQO5aDK0xXam4cUQXT8g\\\/featured\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/person\\\/e8ca7fd09857a736a25e6b4455a3ab61\",\"name\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g\",\"caption\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8\"},\"description\":\"\u3010\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u3011 DX\u8a8d\u5b9a\u53d6\u5f97\u4e8b\u696d\u8005\u306b\u9078\u5b9a\u3055\u308c\u3066\u3044\u308b\u682a\u5f0f\u4f1a\u793eSAMURAI\u306e\u30de\u30fc\u30b1\u30c6\u30a3\u30f3\u30b0\u30fb\u30b3\u30df\u30e5\u30cb\u30b1\u30fc\u30b7\u30e7\u30f3\u90e8\u304c\u904b\u55b6\u3002\u300c\u8cea\u306e\u9ad8\u3044IT\u6559\u80b2\u3092\u3001\u3059\u3079\u3066\u306e\u4eba\u306b\u300d\u3092\u30df\u30c3\u30b7\u30e7\u30f3\u306b\u3001IT\u30fb\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3092\u5b66\u3073\u59cb\u3081\u305f\u521d\u5b66\u8005\u306e\u65b9\u306b\u5411\u3051\u8a18\u4e8b\u3092\u57f7\u7b46\u3002 \u7d2f\u8a08\u6307\u5c0e\u8005\u65704\u4e075,000\u540d\u4ee5\u4e0a\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u300c\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u300d\u3001\u7d2f\u8a08\u767b\u9332\u8005\u65701\u4e078,000\u4eba\u4ee5\u4e0a\u306e\u30aa\u30f3\u30e9\u30a4\u30f3\u5b66\u7fd2\u30b5\u30fc\u30d3\u30b9\u300c\u4f8d\u30c6\u30e9\u30b3\u30e4\u300d\u3067\u6271\u3046\u6559\u6750\u958b\u767a\u306e\u30ce\u30a6\u30cf\u30a6\u30012013\u5e74\u306e\u5275\u696d\u304b\u3089\u904b\u55b6\u3067\u5f97\u305f\u77e5\u898b\u306b\u57fa\u3065\u304d\u3001\u8a18\u4e8b\u306e\u57f7\u7b46\u3060\u3051\u3067\u306a\u304f\u7de8\u96c6\u30fb\u76e3\u4fee\u3082\u62c5\u5f53\u3057\u3066\u3044\u307e\u3059\u3002 \u3010\u5c02\u9580\u5206\u91ce\u3011 IT\\\/Web\u958b\u767a\\\/AI\u30fb\u30ed\u30dc\u30c3\u30c8\u958b\u767a\\\/\u30a4\u30f3\u30d5\u30e9\u958b\u767a\\\/\u30b2\u30fc\u30e0\u958b\u767a\\\/AI\\\/Web\u30c7\u30b6\u30a4\u30f3\",\"sameAs\":[\"https:\\\/\\\/www.sejuku.net\\\/\",\"https:\\\/\\\/www.facebook.com\\\/sejuku2013\\\/\",\"https:\\\/\\\/www.instagram.com\\\/samuraiengineer_official\\\/\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/samuraijuku\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCCFOQO5aDK0xXam4cUQXT8g\"],\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/author\\\/samurai-blog\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u3010CakePHP\u5165\u9580\u3011\u30a2\u30bd\u30b7\u30a8\u30fc\u30b7\u30e7\u30f3\u306e\u4f7f\u3044\u65b9\u3092\u30de\u30b9\u30bf\u30fc\u3057\u3088\u3046\uff01 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","description":"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010CakePHP\u5165\u9580\u3011\u30a2\u30bd\u30b7\u30a8\u30fc\u30b7\u30e7\u30f3\u306e\u4f7f\u3044\u65b9\u3092\u30de\u30b9\u30bf\u30fc\u3057\u3088\u3046\uff01 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.sejuku.net\/blog\/31302","og_locale":"ja_JP","og_type":"article","og_title":"\u3010CakePHP\u5165\u9580\u3011\u30a2\u30bd\u30b7\u30a8\u30fc\u30b7\u30e7\u30f3\u306e\u4f7f\u3044\u65b9\u3092\u30de\u30b9\u30bf\u30fc\u3057\u3088\u3046\uff01 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","og_description":"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010CakePHP\u5165\u9580\u3011\u30a2\u30bd\u30b7\u30a8\u30fc\u30b7\u30e7\u30f3\u306e\u4f7f\u3044\u65b9\u3092\u30de\u30b9\u30bf\u30fc\u3057\u3088\u3046\uff01 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002","og_url":"https:\/\/www.sejuku.net\/blog\/31302","og_site_name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","article_publisher":"https:\/\/www.facebook.com\/sejuku2013","article_author":"https:\/\/www.facebook.com\/sejuku2013\/","article_published_time":"2017-08-29T01:41:55+00:00","article_modified_time":"2024-05-06T02:44:46+00:00","og_image":[{"width":700,"height":400,"url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/image25.jpg","type":"image\/jpeg"}],"author":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/samuraijuku","twitter_site":"@samuraijuku","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.sejuku.net\/blog\/31302#article","isPartOf":{"@id":"https:\/\/www.sejuku.net\/blog\/31302"},"author":{"name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8","@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/person\/e8ca7fd09857a736a25e6b4455a3ab61"},"headline":"\u3010CakePHP\u5165\u9580\u3011\u30a2\u30bd\u30b7\u30a8\u30fc\u30b7\u30e7\u30f3\u306e\u4f7f\u3044\u65b9\u3092\u30de\u30b9\u30bf\u30fc\u3057\u3088\u3046\uff01","datePublished":"2017-08-29T01:41:55+00:00","dateModified":"2024-05-06T02:44:46+00:00","mainEntityOfPage":{"@id":"https:\/\/www.sejuku.net\/blog\/31302"},"wordCount":135,"publisher":{"@id":"https:\/\/www.sejuku.net\/blog\/#organization"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/31302#primaryimage"},"thumbnailUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/image25.jpg","articleSection":["PHP\u5b66\u7fd2"],"inLanguage":"ja"},{"@type":"WebPage","@id":"https:\/\/www.sejuku.net\/blog\/31302","url":"https:\/\/www.sejuku.net\/blog\/31302","name":"\u3010CakePHP\u5165\u9580\u3011\u30a2\u30bd\u30b7\u30a8\u30fc\u30b7\u30e7\u30f3\u306e\u4f7f\u3044\u65b9\u3092\u30de\u30b9\u30bf\u30fc\u3057\u3088\u3046\uff01 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","isPartOf":{"@id":"https:\/\/www.sejuku.net\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.sejuku.net\/blog\/31302#primaryimage"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/31302#primaryimage"},"thumbnailUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/image25.jpg","datePublished":"2017-08-29T01:41:55+00:00","dateModified":"2024-05-06T02:44:46+00:00","description":"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010CakePHP\u5165\u9580\u3011\u30a2\u30bd\u30b7\u30a8\u30fc\u30b7\u30e7\u30f3\u306e\u4f7f\u3044\u65b9\u3092\u30de\u30b9\u30bf\u30fc\u3057\u3088\u3046\uff01 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002","breadcrumb":{"@id":"https:\/\/www.sejuku.net\/blog\/31302#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sejuku.net\/blog\/31302"]}]},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.sejuku.net\/blog\/31302#primaryimage","url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/image25.jpg","contentUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/08\/image25.jpg","width":700,"height":400},{"@type":"BreadcrumbList","@id":"https:\/\/www.sejuku.net\/blog\/31302#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sejuku.net\/blog\/"},{"@type":"ListItem","position":2,"name":"\u3010CakePHP\u5165\u9580\u3011\u30a2\u30bd\u30b7\u30a8\u30fc\u30b7\u30e7\u30f3\u306e\u4f7f\u3044\u65b9\u3092\u30de\u30b9\u30bf\u30fc\u3057\u3088\u3046\uff01"}]},{"@type":"WebSite","@id":"https:\/\/www.sejuku.net\/blog\/#website","url":"https:\/\/www.sejuku.net\/blog\/","name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","description":"\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u5b66\u7fd2\u306e\u3059\u3079\u3066\u304c\u30b3\u30b3\u306b\u3002","publisher":{"@id":"https:\/\/www.sejuku.net\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.sejuku.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ja"},{"@type":"Organization","@id":"https:\/\/www.sejuku.net\/blog\/#organization","name":"\u682a\u5f0f\u4f1a\u793eSAMURAI","url":"https:\/\/www.sejuku.net\/blog\/","logo":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2023\/07\/logo.png","contentUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2023\/07\/logo.png","width":600,"height":600,"caption":"\u682a\u5f0f\u4f1a\u793eSAMURAI"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/sejuku2013","https:\/\/x.com\/samuraijuku","https:\/\/www.youtube.com\/channel\/UCCFOQO5aDK0xXam4cUQXT8g\/featured"]},{"@type":"Person","@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/person\/e8ca7fd09857a736a25e6b4455a3ab61","name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/secure.gravatar.com\/avatar\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g","caption":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8"},"description":"\u3010\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u3011 DX\u8a8d\u5b9a\u53d6\u5f97\u4e8b\u696d\u8005\u306b\u9078\u5b9a\u3055\u308c\u3066\u3044\u308b\u682a\u5f0f\u4f1a\u793eSAMURAI\u306e\u30de\u30fc\u30b1\u30c6\u30a3\u30f3\u30b0\u30fb\u30b3\u30df\u30e5\u30cb\u30b1\u30fc\u30b7\u30e7\u30f3\u90e8\u304c\u904b\u55b6\u3002\u300c\u8cea\u306e\u9ad8\u3044IT\u6559\u80b2\u3092\u3001\u3059\u3079\u3066\u306e\u4eba\u306b\u300d\u3092\u30df\u30c3\u30b7\u30e7\u30f3\u306b\u3001IT\u30fb\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3092\u5b66\u3073\u59cb\u3081\u305f\u521d\u5b66\u8005\u306e\u65b9\u306b\u5411\u3051\u8a18\u4e8b\u3092\u57f7\u7b46\u3002 \u7d2f\u8a08\u6307\u5c0e\u8005\u65704\u4e075,000\u540d\u4ee5\u4e0a\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u300c\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u300d\u3001\u7d2f\u8a08\u767b\u9332\u8005\u65701\u4e078,000\u4eba\u4ee5\u4e0a\u306e\u30aa\u30f3\u30e9\u30a4\u30f3\u5b66\u7fd2\u30b5\u30fc\u30d3\u30b9\u300c\u4f8d\u30c6\u30e9\u30b3\u30e4\u300d\u3067\u6271\u3046\u6559\u6750\u958b\u767a\u306e\u30ce\u30a6\u30cf\u30a6\u30012013\u5e74\u306e\u5275\u696d\u304b\u3089\u904b\u55b6\u3067\u5f97\u305f\u77e5\u898b\u306b\u57fa\u3065\u304d\u3001\u8a18\u4e8b\u306e\u57f7\u7b46\u3060\u3051\u3067\u306a\u304f\u7de8\u96c6\u30fb\u76e3\u4fee\u3082\u62c5\u5f53\u3057\u3066\u3044\u307e\u3059\u3002 \u3010\u5c02\u9580\u5206\u91ce\u3011 IT\/Web\u958b\u767a\/AI\u30fb\u30ed\u30dc\u30c3\u30c8\u958b\u767a\/\u30a4\u30f3\u30d5\u30e9\u958b\u767a\/\u30b2\u30fc\u30e0\u958b\u767a\/AI\/Web\u30c7\u30b6\u30a4\u30f3","sameAs":["https:\/\/www.sejuku.net\/","https:\/\/www.facebook.com\/sejuku2013\/","https:\/\/www.instagram.com\/samuraiengineer_official\/","https:\/\/x.com\/https:\/\/twitter.com\/samuraijuku","https:\/\/www.youtube.com\/channel\/UCCFOQO5aDK0xXam4cUQXT8g"],"url":"https:\/\/www.sejuku.net\/blog\/author\/samurai-blog"}]}},"_links":{"self":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts\/31302","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/comments?post=31302"}],"version-history":[{"count":0,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts\/31302\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/media\/31303"}],"wp:attachment":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/media?parent=31302"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/categories?post=31302"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/tags?post=31302"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}