{"id":12084,"date":"2022-04-29T10:00:00","date_gmt":"2022-04-29T01:00:00","guid":{"rendered":"https:\/\/www.gigas-jp.com\/appnews\/?p=12084"},"modified":"2022-04-28T19:54:42","modified_gmt":"2022-04-28T10:54:42","slug":"%e7%9f%a5%e3%81%a3%e3%81%a6%e3%81%8a%e3%81%84%e3%81%a6%e3%81%84%e3%81%9f%e3%81%a0%e3%81%8d%e3%81%9f%e3%81%84%e3%81%93%e3%81%a8-3","status":"publish","type":"post","link":"https:\/\/www.gigas-jp.com\/appnews\/archives\/12084","title":{"rendered":"\u77e5\u3063\u3066\u304a\u3044\u3066\u3044\u305f\u3060\u304d\u305f\u3044\u3053\u3068 \u2013 3"},"content":{"rendered":"\n<p>\u4eca\u56de\u3082\u3001Laravel\u306e\u77e5\u3063\u3066\u304a\u3044\u305f\u65b9\u304c\u3044\u3044\u3068\u304a\u3082\u3063\u305f\u3053\u3068\u3092\u3044\u304f\u3064\u304b\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3>Tip   # Laravel  #exclude <\/h3>\n\n\n\n<p>\u5165\u529b\u3092\u53d7\u3051\u4ed8\u3051\u308b\u3068\u3001\u305d\u306e\u30c7\u30fc\u30bf\u3092\u4f7f\u3063\u3066\u30e2\u30c7\u30eb\u3092\u4f5c\u308a\u305f\u3044\u3068\u601d\u3046\u3053\u3068\u304c\u3088\u304f\u3042\u308a\u307e\u3059\u3002<br>\u4f8b\u3048\u3070\u3001\u767b\u9332\u30d5\u30a9\u30fc\u30e0\u306fUser\u30e2\u30c7\u30eb\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u306b\u4f7f\u308f\u308c\u308b\u3067\u3057\u3087\u3046\u3002\u3057\u304b\u3057\u3001\u3059\u3079\u3066\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u691c\u8a3c\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u4e00\u65b9\u3067\u3001\u30e2\u30c7\u30eb\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u306b\u3059\u3079\u3066\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u5fc5\u8981\u3068\u3057\u306a\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002\u3053\u306e\u3088\u3046\u306a\u5834\u5408\u3001\u300cexclude\u300d\u30eb\u30fc\u30eb\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class StoreRequest extends FormRequest\n{\n  public function rules(){\n      return &#091;\n         'name'                    =&gt; 'required|string',\n         'email_address'           =&gt; 'required|string|email',\n         'terms_and_conditions'    =&gt; 'required|accepted|exclude',    \n       ];\n  }\n}<\/code><\/pre>\n\n\n\n<p>exclude&#8217; \u30eb\u30fc\u30eb\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001Laravel \u306f &#8216;terms_and_conditions&#8217; \u30d5\u30a3\u30fc\u30eb\u30c9\u304c\u5168\u3066\u306e\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u30eb\u30fc\u30eb\u3092\u30d1\u30b9\u3059\u308b\u3053\u3068\u3092\u4fdd\u8a3c\u3057\u307e\u3059\u304c\u3001 &#8216;validate&#8217; \u307e\u305f\u306f &#8216;validated&#8217; \u30e1\u30bd\u30c3\u30c9\u306b\u3088\u3063\u3066\u8fd4\u3055\u308c\u308b\u308f\u3051\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u3053\u308c\u306b\u3088\u308a\u3001DB\u306b&#8217;terms_and_conditions&#8217;\u306e\u30ab\u30e9\u30e0\u304c\u306a\u3044\u3053\u3068\u3092\u6c17\u306b\u305b\u305a\u306b\u3001\u7c21\u5358\u306b\u30e2\u30c7\u30eb\u3092\u4f5c\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class RegistrationController extends Controller \n{\n     public function store(StoreRequest $request)\n     {\n        $playload = $request-&gt;validate(); \/\/\u540d\u3068\u30e1\u30fc\u30eb\u3060\u3051\n        $user = User::create($playload);\n        Auth::login($user);\n        return redirect()-&gt;route('dashboard');\n     }\n}<\/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\/12084\" ><\/g:plusone><\/div>\n            <div class=\"wsbl_hatena_button\"><a href=\"\/\/b.hatena.ne.jp\/entry\/https:\/\/www.gigas-jp.com\/appnews\/archives\/12084\" class=\"hatena-bookmark-button\" data-hatena-bookmark-title=\"\u77e5\u3063\u3066\u304a\u3044\u3066\u3044\u305f\u3060\u304d\u305f\u3044\u3053\u3068 \u2013 3\" 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\/12084\" data-text=\"\u77e5\u3063\u3066\u304a\u3044\u3066\u3044\u305f\u3060\u304d\u305f\u3044\u3053\u3068 \u2013 3\" 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\/12084\" 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\/12084\" 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\u306e\u77e5\u3063\u3066\u304a\u3044\u305f\u65b9\u304c\u3044\u3044\u3068\u304a\u3082\u3063\u305f\u3053\u3068\u3092\u3044\u304f\u3064\u304b\u7d39\u4ecb\u3057\u307e\u3059\u3002 Tip # Laravel #exclude \u5165\u529b\u3092\u53d7\u3051\u4ed8\u3051\u308b\u3068\u3001\u305d\u306e\u30c7\u30fc\u30bf\u3092\u4f7f\u3063\u3066\u30e2\u30c7\u30eb\u3092\u4f5c\u308a\u305f\u3044\u3068\u601d\u3046\u3053\u3068\u304c\u3088\u304f\u3042\u308a\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001\u767b\u9332 [&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\/12084"}],"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=12084"}],"version-history":[{"count":3,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts\/12084\/revisions"}],"predecessor-version":[{"id":12091,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts\/12084\/revisions\/12091"}],"wp:attachment":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/media?parent=12084"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/categories?post=12084"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/tags?post=12084"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}