{"id":1696,"date":"2019-12-29T11:39:40","date_gmt":"2019-12-29T02:39:40","guid":{"rendered":"https:\/\/naoya-ono.com\/blog\/?p=1696"},"modified":"2020-04-29T13:41:03","modified_gmt":"2020-04-29T04:41:03","slug":"laravel-calam-type","status":"publish","type":"post","link":"https:\/\/naoya-ono.com\/blog\/laravel-calam-type\/","title":{"rendered":"\u3010Laravel\u30e1\u30e2\u3011\u30c6\u30fc\u30d6\u30eb\u4f5c\u6210\u6642\u306b\u3001\u6307\u5b9a\u3067\u304d\u308b\u30ab\u30e9\u30e0\u306e\u30c7\u30fc\u30bf\u578b"},"content":{"rendered":"<p><span>Laravel\u3067\u306f\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u3068\u3044\u3046\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u7ba1\u7406\u3059\u308b\u305f\u3081\u306e\u4fbf\u5229\u6a5f\u80fd\u304c\u3042\u308a\u3001\u3053\u308c\u3092\u4f7f\u3046\u3053\u3068\u3067\u30c6\u30fc\u30d6\u30eb\u4f5c\u6210\u3084\u524a\u9664\u306a\u3069\u304c\u884c\u3048\u307e\u3059\u3002<\/span><\/p>\n<p>\u3053\u306e\u30da\u30fc\u30b8\u3067\u306f\u3001\u305d\u306e\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u6a5f\u80fd\u3092\u4f7f\u3063\u3066\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210\u3059\u308b\u3068\u304d\u306b\u3001<strong>\u6307\u5b9a\u3067\u304d\u308b\u30ab\u30e9\u30e0\u306e\u30c7\u30fc\u30bf\u578b<\/strong>\u306b\u3064\u3044\u3066\u307e\u3068\u3081\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2 class=\"hh hh5 pastel-bc\" id=\"i-0\">\u6307\u5b9a\u3067\u304d\u308b\u30ab\u30e9\u30e0\u306e\u30c7\u30fc\u30bf\u578b<\/h2>\n<p>\u6307\u5b9a\u3067\u304d\u308b\u30c7\u30fc\u30bf\u578b\u306e\u7a2e\u985e\u306f\u304b\u306a\u308a\u591a\u3044\u306e\u3067\u3001\u3088\u304f\u4f7f\u3046\u30c7\u30fc\u30bf\u578b\u3092\u6319\u3052\u308b\u3068\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<table style=\"border-collapse: collapse; width: 100%; height: 429px;\">\n<tbody>\n<tr style=\"height: 39px; background-color: #1a435d;\">\n<td style=\"width: 41.3473%; height: 39px;\"><span style=\"color: #ffffff;\">\u30b3\u30de\u30f3\u30c9<\/span><\/td>\n<td style=\"width: 58.6527%; height: 39px;\"><span style=\"color: #ffffff;\">\u8aac\u660e<\/span><\/td>\n<\/tr>\n<tr style=\"height: 39px;\">\n<td style=\"width: 41.3473%; height: 39px;\"><span>$table-&gt;increments(\u2018\u30ab\u30e9\u30e0\u540d\u2019);<\/span><\/td>\n<td style=\"width: 58.6527%; height: 39px;\"><span>\u7b26\u53f7\u306a\u3057INT\u3092\u4f7f\u7528\u3057\u305f\u81ea\u52d5\u5897\u5206ID\uff08\u4e3b\u30ad\u30fc\uff09<\/span><\/td>\n<\/tr>\n<tr style=\"height: 39px;\">\n<td style=\"width: 41.3473%; height: 39px;\"><span>$table-&gt;integer(\u2018\u30ab\u30e9\u30e0\u540d\u2019);<\/span><\/td>\n<td style=\"width: 58.6527%; height: 39px;\">INT\u578b<\/td>\n<\/tr>\n<tr style=\"height: 39px;\">\n<td style=\"width: 41.3473%; height: 39px;\"><span>$table-&gt;string(\u2018\u30ab\u30e9\u30e0\u540d\u2019);<\/span><\/td>\n<td style=\"width: 58.6527%; height: 39px;\"><span>VARCHAR\u578b\u3001255\u6587\u5b57<\/span><\/td>\n<\/tr>\n<tr style=\"height: 39px;\">\n<td style=\"width: 41.3473%; height: 39px;\"><span>$table-&gt;string(\u2018\u30ab\u30e9\u30e0\u540d\u2019, \u9577\u3055);<\/span><\/td>\n<td style=\"width: 58.6527%; height: 39px;\"><span>\u9577\u3055\u6307\u5b9a\u306eVARCHAR\u578b<\/span><\/td>\n<\/tr>\n<tr style=\"height: 39px;\">\n<td style=\"width: 41.3473%; height: 39px;\"><span>$table-&gt;text(\u2018\u30ab\u30e9\u30e0\u540d\u2019);<\/span><\/td>\n<td style=\"width: 58.6527%; height: 39px;\">TEXT\u578b\u30ab\u30e9\u30e0<\/td>\n<\/tr>\n<tr style=\"height: 39px;\">\n<td style=\"width: 41.3473%; height: 39px;\"><span>$table-&gt;date(\u2018\u30ab\u30e9\u30e0\u540d\u2019);<\/span><\/td>\n<td style=\"width: 58.6527%; height: 39px;\">\u65e5\u4ed8\u30ab\u30e9\u30e0<\/td>\n<\/tr>\n<tr style=\"height: 39px;\">\n<td style=\"width: 41.3473%; height: 39px;\"><span>$table-&gt;dateTime(\u2018\u30ab\u30e9\u30e0\u540d\u2019);<\/span><\/td>\n<td style=\"width: 58.6527%; height: 39px;\">\u65e5\u6642\u30ab\u30e9\u30e0<\/td>\n<\/tr>\n<tr style=\"height: 39px;\">\n<td style=\"width: 41.3473%; height: 39px;\">$table-&gt;boolean(\u2018\u30ab\u30e9\u30e0\u540d\u2019);<\/td>\n<td style=\"width: 58.6527%; height: 39px;\">\u771f\u507d\u5024\u30ab\u30e9\u30e0<\/td>\n<\/tr>\n<tr style=\"height: 39px;\">\n<td style=\"width: 41.3473%; height: 39px;\">$table-&gt;timestamp(\u2018\u30ab\u30e9\u30e0\u540d\u2019);<\/td>\n<td style=\"width: 58.6527%; height: 39px;\">TIMESTAMP\u30ab\u30e9\u30e0<\/td>\n<\/tr>\n<tr style=\"height: 39px;\">\n<td style=\"width: 41.3473%; height: 39px;\">$table-&gt;timestamps();<\/td>\n<td style=\"width: 58.6527%; height: 39px;\">created_at \u3068 update_at \u30ab\u30e9\u30e0<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u3082\u3057\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u3092\u6307\u5b9a\u3057\u305f\u3044\u5834\u5408\u306f\u3001\u6b21\u306e\u3088\u3046\u306bdefault()\u30e1\u30bd\u30c3\u30c9\u3092\u30aa\u30d7\u30b7\u30e7\u30f3\u3068\u3057\u3066\u4ed8\u3051\u3066\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>$table-&gt;boolean('delete_flg')-&gt;default(false);<\/code><\/pre>\n<\/div>\n<p>\u30ab\u30e9\u30e0\u306eNULL\u3092\u8a31\u53ef\u3057\u305f\u3044\u5834\u5408\u306f\u3001<span>nullable()\u30e1\u30bd\u30c3\u30c9\u3092\u30aa\u30d7\u30b7\u30e7\u30f3\u3068\u3057\u3066\u4ed8\u3051\u3066\u6307\u5b9a\u3057\u307e\u3059\u3002<\/span><\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>$table-&gt;string('name')-&gt;nullable();<\/code><\/pre>\n<\/div>\n<p>\u57fa\u672c\u7684\u306b\u306f\u4e0a\u8a18\u306e\u5185\u5bb9\u3067\u3001\u4e8b\u8db3\u308a\u308b\u3068\u601d\u3044\u307e\u3059\u304c\u3001\u4ed6\u306b\u3082\u6307\u5b9a\u3067\u304d\u308b\u30ab\u30e9\u30e0\u3084\u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u77e5\u308a\u305f\u3044\u3068\u8a00\u3046\u5834\u5408\u306f\u3001\u3053\u3061\u3089\u306eLaravel\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u304c\u5f79\u306b\u7acb\u3061\u307e\u3059\u3002<\/p>\n<p>  <a class=\"reference table\" href=\"https:\/\/readouble.com\/laravel\/6.x\/ja\/migrations.html\" rel=\"noopener noreferrer\"><br \/>\n    <span class=\"tbcell refttl\">\u53c2\u8003<\/span><br \/>\n    <span class=\"tbcell refcite\">\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3<span>Laravel\u30a4\u30f3\u30c7\u30c3\u30af\u30b9<\/span><\/span><br \/>\n  <\/a><\/p>\n<div id=\"rinkerid1788\" class=\"yyi-rinker-contents  yyi-rinker-postid-1788 yyi-rinker-img-m yyi-rinker-catid-29 yyi-rinker-catid-3 \">\n<div class=\"yyi-rinker-box\">\n<div class=\"yyi-rinker-image\">\n\t\t\t\t\t\t\t<a href=\"https:\/\/www.amazon.co.jp\/dp\/4798060992?tag=naoya-ono-22&amp;linkCode=ogi&amp;th=1&amp;psc=1\" rel=\"nofollow\" class=\"yyi-rinker-tracking\" data-click-tracking=\"amazon_img 1788 PHP\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30afLaravel\u5165\u9580 \u7b2c\uff12\u7248\" data-vars-click-id=\"amazon_img 1788 PHP\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30afLaravel\u5165\u9580 \u7b2c\uff12\u7248\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/m.media-amazon.com\/images\/I\/51I2lZaKIoL._SL160_.jpg\" width=\"123\" height=\"160\" class=\"yyi-rinker-main-img\" style=\"border: none;\"><\/a>\t\t\t\t\t<\/div>\n<div class=\"yyi-rinker-info\">\n<div class=\"yyi-rinker-title\">\n\t\t\t\t\t\t\t\t\t<a href=\"https:\/\/www.amazon.co.jp\/dp\/4798060992?tag=naoya-ono-22&amp;linkCode=ogi&amp;th=1&amp;psc=1\" rel=\"nofollow\" class=\"yyi-rinker-tracking\" data-click-tracking=\"amazon_title 1788 PHP\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30afLaravel\u5165\u9580 \u7b2c\uff12\u7248\" data-vars-amp-click-id=\"amazon_title 1788 PHP\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30afLaravel\u5165\u9580 \u7b2c\uff12\u7248\">PHP\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30afLaravel\u5165\u9580 \u7b2c\uff12\u7248<\/a>\t\t\t\t\t\t\t<\/div>\n<div class=\"yyi-rinker-detail\">\n<div class=\"credit-box\">created by&nbsp;<a href=\"https:\/\/oyakosodate.com\/rinker\/\" rel=\"nofollow noopener\" target=\"_blank\">Rinker<\/a><\/div>\n<div class=\"brand\">\u79c0\u548c\u30b7\u30b9\u30c6\u30e0<\/div>\n<div class=\"price-box\">\n\t\t\t\t\t\t\t<\/div>\n<\/p><\/div>\n<ul class=\"yyi-rinker-links\">\n<li class=\"amazonlink\">\n\t\t\t\t\t\t<a href=\"https:\/\/www.amazon.co.jp\/dp\/4798060992?tag=naoya-ono-22&amp;linkCode=ogi&amp;th=1&amp;psc=1\" rel=\"nofollow\" class=\"yyi-rinker-link yyi-rinker-tracking\" data-click-tracking=\"amazon 1788 PHP\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30afLaravel\u5165\u9580 \u7b2c\uff12\u7248\" data-vars-amp-click-id=\"amazon 1788 PHP\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30afLaravel\u5165\u9580 \u7b2c\uff12\u7248\">Amazon<\/a>\t\t\t\t\t<\/li>\n<li class=\"rakutenlink\">\n\t\t\t\t\t\t<a href=\"https:\/\/hb.afl.rakuten.co.jp\/hgc\/16781883.64066d33.16781884.4f333982\/Rinker_o_20191229113108?pc=https%3A%2F%2Fsearch.rakuten.co.jp%2Fsearch%2Fmall%2Flaravel%25E5%2585%25A5%25E9%2596%2580%2F%3Ff%3D1%26grp%3Dproduct&amp;m=https%3A%2F%2Fsearch.rakuten.co.jp%2Fsearch%2Fmall%2Flaravel%25E5%2585%25A5%25E9%2596%2580%2F%3Ff%3D1%26grp%3Dproduct\" rel=\"nofollow\" class=\"yyi-rinker-link yyi-rinker-tracking\" data-click-tracking=\"rakuten 1788 PHP\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30afLaravel\u5165\u9580 \u7b2c\uff12\u7248\" data-vars-amp-click-id=\"rakuten 1788 PHP\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30afLaravel\u5165\u9580 \u7b2c\uff12\u7248\">\u697d\u5929\u5e02\u5834<\/a>\t\t\t\t\t<\/li>\n<li class=\"yahoolink\">\n\t\t\t\t\t\t<a href=\"https:\/\/shopping.yahoo.co.jp\/search?p=laravel%E5%85%A5%E9%96%80\" rel=\"nofollow\" class=\"yyi-rinker-link yyi-rinker-tracking\" data-click-tracking=\"yahoo 1788 PHP\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30afLaravel\u5165\u9580 \u7b2c\uff12\u7248\" data-vars-amp-click-id=\"yahoo 1788 PHP\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30afLaravel\u5165\u9580 \u7b2c\uff12\u7248\">Yahoo\u30b7\u30e7\u30c3\u30d4\u30f3\u30b0<\/a>\t\t\t\t\t<\/li>\n<li class=\"freelink2\">\n\t\t\t\t\t\t<a href=\"https:\/\/ck.jp.ap.valuecommerce.com\/servlet\/referral?sid=3490090&amp;pid=886213926&amp;vc_url=https%3A%2F%2Fwww.kinokuniya.co.jp%2Ff%2Fdsg-01-9784798060996&amp;vcpub=0.328489&amp;vcid=wHpPoVjR9MmnBvsEPxWwN6jKPLOBxqHVTcY2bqpaWRcRAtulr-amsfIaXaBv0X57&amp;isec=1577607690\" rel=\"nofollow\" class=\"yyi-rinker-link yyi-rinker-tracking\" data-click-tracking=\"free_2 1788 PHP\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30afLaravel\u5165\u9580 \u7b2c\uff12\u7248\" data-vars-amp-click-id=\"free_2 1788 PHP\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30afLaravel\u5165\u9580 \u7b2c\uff12\u7248\">\u7d00\u4f0a\u570b\u5c4b\u66f8\u5e97<\/a>\t\t\t\t\t<\/li>\n<\/ul><\/div>\n<\/p><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Laravel\u3067\u306f\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u3068\u3044\u3046\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u7ba1\u7406\u3059\u308b\u305f\u3081\u306e\u4fbf\u5229\u6a5f\u80fd\u304c\u3042\u308a\u3001\u3053\u308c\u3092\u4f7f\u3046\u3053\u3068\u3067\u30c6\u30fc\u30d6\u30eb\u4f5c\u6210\u3084\u524a\u9664\u306a\u3069\u304c\u884c\u3048\u307e\u3059\u3002 \u3053\u306e\u30da\u30fc\u30b8\u3067\u306f\u3001\u305d\u306e\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u6a5f\u80fd\u3092\u4f7f\u3063\u3066\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210\u3059\u308b\u3068\u304d\u306b &#8230; <\/p>\n","protected":false},"author":1,"featured_media":1791,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29,3],"tags":[],"_links":{"self":[{"href":"https:\/\/naoya-ono.com\/blog\/wp-json\/wp\/v2\/posts\/1696"}],"collection":[{"href":"https:\/\/naoya-ono.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/naoya-ono.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/naoya-ono.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/naoya-ono.com\/blog\/wp-json\/wp\/v2\/comments?post=1696"}],"version-history":[{"count":10,"href":"https:\/\/naoya-ono.com\/blog\/wp-json\/wp\/v2\/posts\/1696\/revisions"}],"predecessor-version":[{"id":1790,"href":"https:\/\/naoya-ono.com\/blog\/wp-json\/wp\/v2\/posts\/1696\/revisions\/1790"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/naoya-ono.com\/blog\/wp-json\/wp\/v2\/media\/1791"}],"wp:attachment":[{"href":"https:\/\/naoya-ono.com\/blog\/wp-json\/wp\/v2\/media?parent=1696"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/naoya-ono.com\/blog\/wp-json\/wp\/v2\/categories?post=1696"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/naoya-ono.com\/blog\/wp-json\/wp\/v2\/tags?post=1696"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}