{"id":12373,"date":"2022-08-05T10:00:00","date_gmt":"2022-08-05T01:00:00","guid":{"rendered":"https:\/\/www.gigas-jp.com\/appnews\/?p=12373"},"modified":"2022-08-04T21:18:48","modified_gmt":"2022-08-04T12:18:48","slug":"laravel-tips","status":"publish","type":"post","link":"https:\/\/www.gigas-jp.com\/appnews\/archives\/12373","title":{"rendered":"Laravel Tips"},"content":{"rendered":"\n<p>\u4eca\u56de\u3082\u3001laravel\u306eTips\u3092\u3044\u304f\u3064\u304b\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h4>\u2460\u5225\u306e\u30ab\u30e9\u30e0\u306e\u5f8c\u306b\u30ab\u30e9\u30e0\u3092\u8ffd\u52a0\u3057\u305f\u3044\u5834\u5408\u306f\u3001<code>after<\/code>\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\n     Schema::table('users', function(Blueprint $table){\n        $table-&gt;after('email', function($table){\n            $table-&gt;integer('status');\n            $table-&gt;string('address');\n            $table-&gt;string('city');\n            $table-&gt;string('state');\n         });\n     });<\/code><\/pre>\n\n\n\n<h4>\u2461\u4e0e\u3048\u3089\u308c\u305f\u5024\u304cfilled\u304bblank\u304b\u3092\u5224\u65ad\u3057\u305f\u3044\u5834\u5408\u306f\u3001 <code>empty()<\/code> \u3084 <code>is_null()<\/code> \u306a\u3069\u306e\u4ee3\u308f\u308a\u306b\u3001\u30d8\u30eb\u30d1\u30fc\u95a2\u6570 <code>filled()<\/code> \u3092\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>filled(0);\nfilled(true);\nfilled(false);\n\n\/\/return true\n\n\nfilled('');\nfilled(' ');\nfilled(null);\nfilled(collection());\n\n\/\/return false<\/code><\/pre>\n\n\n\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u4eca\u56de\u306f\u3053\u308c\u3067\u7d42\u308f\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u91d1\u66dc\u62c5\u5f53 \u2013 Ami<\/p>\n<div class='wp_social_bookmarking_light'>\n            <div class=\"wsbl_google_plus_one\"><g:plusone size=\"medium\" annotation=\"none\" href=\"https:\/\/www.gigas-jp.com\/appnews\/archives\/12373\" ><\/g:plusone><\/div>\n            <div class=\"wsbl_hatena_button\"><a href=\"\/\/b.hatena.ne.jp\/entry\/https:\/\/www.gigas-jp.com\/appnews\/archives\/12373\" class=\"hatena-bookmark-button\" data-hatena-bookmark-title=\"Laravel Tips\" data-hatena-bookmark-layout=\"standard\" title=\"\u3053\u306e\u30a8\u30f3\u30c8\u30ea\u30fc\u3092\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af\u306b\u8ffd\u52a0\"> <img src=\"\/\/b.hatena.ne.jp\/images\/entry-button\/button-only@2x.png\" alt=\"\u3053\u306e\u30a8\u30f3\u30c8\u30ea\u30fc\u3092\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af\u306b\u8ffd\u52a0\" width=\"20\" height=\"20\" style=\"border: none;\" \/><\/a><script type=\"text\/javascript\" src=\"\/\/b.hatena.ne.jp\/js\/bookmark_button.js\" charset=\"utf-8\" async=\"async\"><\/script><\/div>\n            <div class=\"wsbl_twitter\"><a href=\"https:\/\/twitter.com\/share\" class=\"twitter-share-button\" data-url=\"https:\/\/www.gigas-jp.com\/appnews\/archives\/12373\" data-text=\"Laravel Tips\" data-via=\"GIGASJAPAN_APPS\" data-lang=\"ja\">Tweet<\/a><\/div>\n            <div class=\"wsbl_facebook_like\"><div id=\"fb-root\"><\/div><fb:like href=\"https:\/\/www.gigas-jp.com\/appnews\/archives\/12373\" layout=\"button_count\" action=\"like\" width=\"100\" share=\"false\" show_faces=\"false\" ><\/fb:like><\/div>\n            <div class=\"wsbl_facebook_send\"><div id=\"fb-root\"><\/div><fb:send href=\"https:\/\/www.gigas-jp.com\/appnews\/archives\/12373\" colorscheme=\"light\" ><\/fb:send><\/div>\n    <\/div>\n<br class='wp_social_bookmarking_light_clear' \/>\n","protected":false},"excerpt":{"rendered":"<p>\u4eca\u56de\u3082\u3001laravel\u306eTips\u3092\u3044\u304f\u3064\u304b\u7d39\u4ecb\u3057\u307e\u3059\u3002 \u2460\u5225\u306e\u30ab\u30e9\u30e0\u306e\u5f8c\u306b\u30ab\u30e9\u30e0\u3092\u8ffd\u52a0\u3057\u305f\u3044\u5834\u5408\u306f\u3001after\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 \u2461\u4e0e\u3048\u3089\u308c\u305f\u5024\u304cfilled\u304bblank\u304b\u3092\u5224\u65ad\u3057\u305f\u3044\u5834\u5408\u306f\u3001 empty [&hellip;]<\/p>\n","protected":false},"author":19,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[100],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts\/12373"}],"collection":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/users\/19"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/comments?post=12373"}],"version-history":[{"count":6,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts\/12373\/revisions"}],"predecessor-version":[{"id":12383,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts\/12373\/revisions\/12383"}],"wp:attachment":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/media?parent=12373"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/categories?post=12373"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/tags?post=12373"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}