{"id":2500,"date":"2019-04-18T08:45:04","date_gmt":"2019-04-17T23:45:04","guid":{"rendered":"https:\/\/promidea.co.jp\/?p=2500"},"modified":"2021-08-03T10:41:38","modified_gmt":"2021-08-03T01:41:38","slug":"laravel%e3%81%a7%e3%83%90%e3%83%aa%e3%83%87%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3%e3%82%92%e5%ae%9f%e8%a3%85%e3%81%99%e3%82%8b%e3%82%b5%e3%83%b3%e3%83%97%e3%83%ab%e3%83%97%e3%83%ad%e3%82%b0%e3%83%a9","status":"publish","type":"post","link":"https:\/\/promidea.co.jp\/?p=2500","title":{"rendered":"Laravel\u3067\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u3092\u5b9f\u88c5\u3059\u308b\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0"},"content":{"rendered":"<p>\u30d7\u30ed\u30df\u30c7\u30a3\u30a2\u5408\u540c\u4f1a\u793e\u306e\u6589\u85e4\u3067\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306fPHP Laravel\u3092\u4f7f\u3063\u3066\u3001<strong>\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3<\/strong>\u3092\u5b9f\u88c5\u3059\u308b\u65b9\u6cd5\u3092\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n<p>\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u306f\u3001\u307b\u3068\u3093\u3069\u306eWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067\u4f7f\u308f\u308c\u308b\u6a5f\u80fd\u3067\u3059\u306e\u3067\u3001\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3093\u3067\u7406\u89e3\u3092\u6df1\u3081\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u8a18\u4e8b\u5185\u3067\u306f\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u306e\u90e8\u5206\u3060\u3051\u89e3\u8aac\u3059\u308b\u306e\u3067\u3001\u5168\u30bd\u30fc\u30b9\u304c\u6b32\u3057\u3044\u65b9\u306f<a href=\"https:\/\/github.com\/SadayoshiSaito\/validate_sample\" target=\"_blank\" rel=\"noopener\">GitHub\u306b\u4e0a\u3052\u305f\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9<\/a>\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>&nbsp;<\/p>\n<p><span class=\"huto\">\u5b8c\u6210\u30a4\u30e1\u30fc\u30b8<\/span><\/p>\n<p><span class=\"photoline\"><img loading=\"lazy\" class=\"aligncenter size-full wp-image-2503\" src=\"https:\/\/promidea.co.jp\/db\/wp-content\/uploads\/2019\/04\/validate.png\" alt=\"Laravel\u3067\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u306e\u5b8c\u6210\u30a4\u30e1\u30fc\u30b8\" width=\"637\" height=\"782\" srcset=\"https:\/\/promidea.co.jp\/db\/wp-content\/uploads\/2019\/04\/validate.png 637w, https:\/\/promidea.co.jp\/db\/wp-content\/uploads\/2019\/04\/validate-244x300.png 244w\" sizes=\"(max-width: 637px) 100vw, 637px\" \/><\/span><\/p>\n<p>&nbsp;<\/p>\n<!--TOC-->\n<h2>Laravel\u3067\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u3092\u5b9f\u88c5\u3059\u308b\u305f\u3081\u306e\u6982\u8981<\/h2>\n<p>Laravel\u3067\u306f<span class=\"huto\">\u30d5\u30a9\u30fc\u30e0\u30ea\u30af\u30a8\u30b9\u30c8<\/span>\u3068\u3044\u3046\u6a5f\u80fd\u3092\u4f7f\u3063\u3066\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u3092\u5b9f\u88c5\u3057\u307e\u3059\u3002<\/p>\n<p>\u53b3\u5bc6\u306b\u306f\u30d5\u30a9\u30fc\u30e0\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u4f7f\u308f\u305a\u306b\u3001\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u5185\u306b\u8a18\u8ff0\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u308b\u306e\u3067\u3059\u304c\u3001\u305d\u308c\u3060\u3068\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u5185\u306b\u51e6\u7406\u3068\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u304c\u6df7\u5728\u3057\u3066\u3057\u307e\u3044\u3001<span class=\"hutoaka\">\u53ef\u8aad\u6027\u304c\u60aa\u304f\u306a\u308a\u307e\u3059<\/span>\u3002<\/p>\n<p>\u3067\u3059\u306e\u3067\u3001\u57fa\u672c\u7684\u306b<span class=\"huto\">\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u306f\u30d5\u30a9\u30fc\u30e0\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u4f7f\u3046<\/span>\u3082\u306e\u3067\u3042\u308b\u3068\u899a\u3048\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u307e\u305f\u3001\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u306e\u4ee3\u8868\u7684\u306a\u30c1\u30a7\u30c3\u30af\u30d1\u30bf\u30fc\u30f3\u306f<span class=\"huto\">\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u5074\u3067\u7528\u610f\u3055\u308c\u3066\u3044\u308b<\/span>\u306e\u3067\u3001\u666e\u901a\u306e\u30c1\u30a7\u30c3\u30af\u3067\u3042\u308c\u3070\u7c21\u5358\u306b\u5b9f\u88c5\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<h3>\u4eca\u56de\u4f7f\u7528\u3059\u308b\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u306e\u30c1\u30a7\u30c3\u30af\u30d1\u30bf\u30fc\u30f3<\/h3>\n<p>\u4eca\u56de\u306e\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u306f\u3001\u3088\u304f\u3042\u308a\u305d\u3046\u306a\u30c1\u30a7\u30c3\u30af\u3092\u5165\u308c\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<div class=\"yellowbox\">\n<ul>\n<li>\u672a\u5165\u529b<\/li>\n<li>\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9<\/li>\n<li>\u6570\u5024\u306e\u7bc4\u56f2\u6307\u5b9a<\/li>\n<li>\u6587\u5b57\u6570\u5236\u9650<\/li>\n<li>\u30e9\u30b8\u30aa\u30dc\u30bf\u30f3\u3067\u306e\u5fc5\u9808\u64b0\u629e<\/li>\n<li>\u82f1\u8a9e\u4ee5\u5916\u306e\u6587\u5b57\u304c\u542b\u307e\u308c\u3066\u3044\u308b<\/li>\n<\/ul>\n<\/div>\n<p>\u7528\u610f\u3055\u308c\u3066\u3044\u308b\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u306e\u5168\u30d1\u30bf\u30fc\u30f3\u306b\u3064\u3044\u3066\u306f\u3001\u4e0b\u8a18\u306e\u516c\u5f0f\u30b5\u30a4\u30c8\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><a href=\"https:\/\/readouble.com\/laravel\/5.5\/ja\/validation.html\" target=\"_blank\" rel=\"noopener\">\u4f7f\u7528\u53ef\u80fd\u306a\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u30eb\u30fc\u30eb<\/a><\/p>\n<p>&nbsp;<\/p>\n<h3>\u30d5\u30a9\u30fc\u30e0\u30ea\u30af\u30a8\u30b9\u30c8\u3067\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u304c\u5b9f\u884c\u3055\u308c\u308b\u30bf\u30a4\u30df\u30f3\u30b0<\/h3>\n<p>\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u306e\u5f15\u6570\u306b\u901a\u5e38\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u3067\u306f\u306a\u304f\u3001\u4f5c\u6210\u3057\u305f\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u6307\u5b9a\u3059\u308b\u3068\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u306b\u5165\u3063\u3066\u304f\u308b\u524d\u306b\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u304c\u5b9f\u884c\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/promidea.co.jp\/db\/wp-content\/uploads\/2019\/04\/validate3.png\"><img loading=\"lazy\" class=\"aligncenter wp-image-2512\" src=\"https:\/\/promidea.co.jp\/db\/wp-content\/uploads\/2019\/04\/validate3.png\" alt=\"\" width=\"645\" height=\"337\" srcset=\"https:\/\/promidea.co.jp\/db\/wp-content\/uploads\/2019\/04\/validate3.png 864w, https:\/\/promidea.co.jp\/db\/wp-content\/uploads\/2019\/04\/validate3-300x157.png 300w, https:\/\/promidea.co.jp\/db\/wp-content\/uploads\/2019\/04\/validate3-768x402.png 768w\" sizes=\"(max-width: 645px) 100vw, 645px\" \/><\/a><\/p>\n<p>\u8a73\u3057\u304f\u306f\u5f8c\u307b\u3069\u51fa\u3066\u304f\u308b\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>&nbsp;<\/p>\n<h3>\u30d5\u30a9\u30fc\u30e0\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u4f7f\u3046\u30e1\u30ea\u30c3\u30c8<\/h3>\n<div class=\"yellowbox\">\n<ol>\n<li>\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u306e\u5b9f\u88c5\u3060\u3051\u3092\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u304b\u3089\u5206\u96e2\u3067\u304d\u308b<\/li>\n<li><span class=\"huto\">\u65e5\u672c\u8a9e\u3067<\/span>\u72ec\u81ea\u306e\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8868\u793a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b<\/li>\n<\/ol>\n<\/div>\n<p>&nbsp;<\/p>\n<h2>\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u306e\u5b9f\u88c5<\/h2>\n<p>\u4eca\u56de\u306e\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u306f\u3001\u5358\u7d14\u306b1\u753b\u9762\u3060\u3051\u306e\u5165\u529b\u30d5\u30a9\u30fc\u30e0\u3067\u89e3\u8aac\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p>\u5404\u9805\u76ee\u306e\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u5185\u5bb9\u304c\u308f\u304b\u308b\u3088\u3046\u306b\u3001\u30e9\u30d9\u30eb\u306b\u66f8\u3044\u3066\u304a\u304d\u307e\u3057\u305f\u3002<\/p>\n<p><span class=\"st-aka\">\u203bForm\u30d5\u30a1\u30b5\u30fc\u30c9\u3001Bootstrap\u3092\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u305d\u306e\u90e8\u5206\u306e\u89e3\u8aac\u306f\u7701\u7565\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n<p><span class=\"photoline\"><img loading=\"lazy\" class=\"aligncenter wp-image-2508 size-full\" src=\"https:\/\/promidea.co.jp\/db\/wp-content\/uploads\/2019\/04\/validate2.png\" alt=\"\" width=\"639\" height=\"558\" srcset=\"https:\/\/promidea.co.jp\/db\/wp-content\/uploads\/2019\/04\/validate2.png 639w, https:\/\/promidea.co.jp\/db\/wp-content\/uploads\/2019\/04\/validate2-300x262.png 300w\" sizes=\"(max-width: 639px) 100vw, 639px\" \/><\/span><\/p>\n<h3>\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0<\/h3>\n<p>\u30eb\u30fc\u30c8\u306f\u4e0b\u8a18\u306e2\u3064\u306e\u307f\u3067\u3059\u3002<\/p>\n<p>routes\/web.php<\/p>\n<pre class=\"lang:default decode:true \">Route::get('\/', 'ValidateTestController@index');\r\nRoute::post('\/', 'ValidateTestController@create');<\/pre>\n<p>\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u3059\u308b\u5074\u306e\u307f<span class=\"huto\">\u30e1\u30bd\u30c3\u30c9\u306e\u5f15\u6570\u306e\u578b\u3092\u5909\u3048\u308b<\/span>\u306e\u3067\u3001\u30e1\u30bd\u30c3\u30c9\u306fget\u3068post\u3067\u5225\u306b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\uff08\u6700\u521d\u3001\u4e00\u7dd2\u306e\u30e1\u30bd\u30c3\u30c9\u306b\u3057\u3066\u30cf\u30de\u308a\u307e\u3057\u305f\uff09<\/p>\n<p>&nbsp;<\/p>\n<h3>\u30d5\u30a9\u30fc\u30e0\u30ea\u30af\u30a8\u30b9\u30c8\u306e\u4f5c\u6210<\/h3>\n<p>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30d5\u30a9\u30eb\u30c0\u76f4\u4e0b\u3067\u30bf\u30fc\u30df\u30ca\u30eb\u304b\u3089\u4e0b\u8a18\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u3001\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u7528\u306e\u30af\u30e9\u30b9\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<div class=\"graybox\">\n<p>php artisan make:request ValidateTestRequest<\/p>\n<\/div>\n<p><span class=\"st-aka\">\u203b\u30ea\u30af\u30a8\u30b9\u30c8\u306e\u540d\u524d\u306f\u4efb\u610f\u3067\u3064\u3051\u3066\u304f\u3060\u3055\u3044\u3002\u4eca\u56de\u306f\u300c<span class=\"ymarker-s\">ValidateTestRequest<\/span>\u300d\u3068\u3044\u3046\u540d\u79f0\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<h3>\u30d5\u30a9\u30fc\u30e0\u30ea\u30af\u30a8\u30b9\u30c8\u306e\u5b9f\u88c5<\/h3>\n<p>\u521d\u671f\u72b6\u614b\u304b\u3089<\/p>\n<ul>\n<li>authorize<\/li>\n<li>rules<\/li>\n<li>messages<\/li>\n<\/ul>\n<p>\u3092\u4eca\u56de\u306e\u4ed5\u69d8\u306b\u5408\u3046\u3088\u3046\u306b\u66f8\u304d\u63db\u3048\u307e\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>app\/Http\/Requests\/ValidateTestRequest.php<\/p>\n<pre class=\"lang:default decode:true\">&lt;?php\r\n\r\nnamespace App\\Http\\Requests;\r\n\r\nuse Illuminate\\Foundation\\Http\\FormRequest;\r\n\r\nclass ValidateTestRequest extends FormRequest\r\n{\r\n    public function authorize()\r\n    {\r\n        if ($this-&gt;path() === '\/')\r\n        {\r\n            \/\/\u30ea\u30af\u30a8\u30b9\u30c8\u306e\u30d1\u30b9\u304c\"\/\"\u306e\u3068\u304d\u3060\u3051\u3001\u3053\u306e\u30af\u30e9\u30b9\u3067\u5b9a\u7fa9\u3057\u305f\r\n            \/\/\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u30eb\u30fc\u30eb\u3092\u9069\u7528\u3059\u308b\r\n            return true;\r\n        }\r\n        else\r\n        {\r\n            return false;\r\n        }\r\n    }\r\n\r\n    public function rules()\r\n    {\r\n        return [\r\n            'text1' =&gt; 'required',\r\n            'text2' =&gt; 'email',\r\n            'text3' =&gt; 'numeric|between:0,100',\r\n            'text4' =&gt; 'size:5',\r\n            'radio1' =&gt; 'required',\r\n            'text6' =&gt; 'alpha',\r\n        ];\r\n    }\r\n\r\n    public function messages()\r\n    {\r\n        return [\r\n            'text1.required' =&gt; '\u5fc5\u9808\u5165\u529b\u3067\u3059\u3002',\r\n            'text2.email' =&gt; '\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306e\u5f62\u5f0f\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002',\r\n            'text3.numeric' =&gt; '1\u301c100\u306e\u7bc4\u56f2\u3067\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002',\r\n            'text4.size' =&gt; '5\u6587\u5b57\u4ee5\u5185\u3067\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002',\r\n            'radio1.required' =&gt; '\u3044\u305a\u308c\u304b\u3092\u64b0\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002',\r\n            'text6.alpha' =&gt; '\u82f1\u8a9e\u4ee5\u5916\u306e\u6587\u5b57\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002',\r\n        ];\r\n    }\r\n}\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p><span class=\"st-aka\">\u203btext1\u306a\u3069\u306f\u5404\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u306eid\u5024\u3067\u3059\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<h3>\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u65e5\u672c\u8a9e\u3067\u8868\u793a\u3055\u305b\u308b<\/h3>\n<p>\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u65e5\u672c\u8a9e\u3067\u8868\u793a\u3055\u305b\u308b\u306b\u306f\u3001<span class=\"huto\">FormRequest\u306emessages\u30e1\u30bd\u30c3\u30c9\u3092\u30aa\u30fc\u30d0\u30fc\u30e9\u30a4\u30c9<\/span>\u3057\u307e\u3059\u3002<\/p>\n<p>\u66f8\u304d\u65b9\u306b\u3064\u3044\u3066\u306f\u4e0a\u8a18\u306erules\u3068messages\u306e\u5bfe\u5fdc\u3092\u898b\u3066\u3044\u305f\u3060\u3051\u305f\u3089\u308f\u304b\u308b\u304b\u306a\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<h3>\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u306e\u5b9f\u88c5<\/h3>\n<p>create\u30e1\u30bd\u30c3\u30c9\u306e<span class=\"huto\">\u5f15\u6570\u306e\u578b\u3092ValidateTestRequest\u306b\u5909\u66f4<\/span>\u3059\u308b\u3053\u3068\u3067\u3001POST\u306e\u3068\u304d\u306e\u307f\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u304c\u884c\u308f\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>app\/Http\/Controllers\/ValidateTestController.php<\/p>\n<pre class=\"lang:default decode:true\">&lt;?php\r\n\r\nnamespace App\\Http\\Controllers;\r\n\r\nuse Illuminate\\Http\\Request;\r\n\r\n\/\/\u4f5c\u6210\u3057\u305f\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3059\u308b\r\nuse App\\Http\\Requests\\ValidateTestRequest;\r\n\r\nclass ValidateTestController extends Controller\r\n{\r\n    public function index(Request $request)\r\n    {\r\n        return view('create');\r\n    }\r\n\r\n    public function create(ValidateTestRequest $request)\r\n    {\r\n        return view('create');  \r\n    }\r\n}\r\n<\/pre>\n<p>&nbsp;<\/p>\n<h3>\u30d3\u30e5\u30fc\u306e\u5b9f\u88c5<\/h3>\n<p>\u30d3\u30e5\u30fc\u3067\u306f\u3001\u30a8\u30e9\u30fc\u304c\u3042\u3063\u305f\u3068\u304d\u3060\u3051\u3001<span class=\"huto\">\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8868\u793a<\/span>\u3059\u308b\u5b9f\u88c5\u3068\u3059\u308b\u306e\u304c\u30dd\u30a4\u30f3\u30c8\u3067\u3059\u3002<\/p>\n<p>resources\/views\/create.blade.php<\/p>\n<p>\u203b\u30d5\u30a9\u30fc\u30e0\u90e8\u5206\u306e\u307f\u629c\u7c8b<\/p>\n<pre class=\"lang:default decode:true\">        &lt;!-- \u767b\u9332\u30d5\u30a9\u30fc\u30e0 --&gt;\r\n        {!! Form::open() !!}\r\n            &lt;div class=\"col-4\"&gt;\r\n                &lt;div class=\"form-group\"&gt;\r\n                    &lt;div&gt;\r\n                    {!! Form::label('label1', '\u5fc5\u9808\u5165\u529b') !!}\r\n                    {!! Form::text('text1', null, ['class' =&gt; 'form-control']) !!}\r\n                    @if ($errors-&gt;has('text1'))\r\n                        &lt;p class='error-string'&gt;{{ $errors-&gt;first('text1') }}&lt;\/p&gt;\r\n                    @endif\r\n                    &lt;\/div&gt;\r\n                    {!! Form::label('label2', '\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9') !!}\r\n                    {!! Form::text('text2', null, ['class' =&gt; 'form-control']) !!}\r\n                    @if ($errors-&gt;has('text2'))\r\n                        &lt;p class='error-string'&gt;{{ $errors-&gt;first('text2') }}&lt;\/p&gt;\r\n                    @endif\r\n                    {!! Form::label('label3', '\u6570\u5024\uff081\u301c100\uff09') !!}\r\n                    {!! Form::text('text3', null, ['class' =&gt; 'form-control']) !!}\r\n                    @if ($errors-&gt;has('text3'))\r\n                        &lt;p class='error-string'&gt;{{ $errors-&gt;first('text3') }}&lt;\/p&gt;\r\n                    @endif\r\n                    {!! Form::label('label4', '\u6587\u5b57\u6570\u5236\u9650\uff085\u6587\u5b57\u4ee5\u5185\uff09') !!}\r\n                    {!! Form::text('text4', null, ['class' =&gt; 'form-control']) !!}\r\n                    @if ($errors-&gt;has('text4'))\r\n                        &lt;p class='error-string'&gt;{{ $errors-&gt;first('text4') }}&lt;\/p&gt;\r\n                    @endif\r\n                    {!! Form::label('label5', '\u5fc5\u9808\u9078\u629e') !!}\r\n                    &lt;div class=\"radio\"&gt;\r\n                        &lt;label&gt;{!! Form::radio('radio1', '1') !!}&amp;nbsp;\u7537\u6027&lt;\/label&gt;\r\n                        &lt;label&gt;{!! Form::radio('radio1', '2') !!}&amp;nbsp;\u5973\u6027&lt;\/label&gt;\r\n                    &lt;\/div&gt;\r\n                    @if ($errors-&gt;has('radio1'))\r\n                        &lt;p class='error-string'&gt;{{ $errors-&gt;first('radio1') }}&lt;\/p&gt;\r\n                    @endif\r\n                    {!! Form::label('label6', '\u82f1\u8a9e\u306e\u307f') !!}\r\n                    {!! Form::text('text6', null, ['class' =&gt; 'form-control']) !!}\r\n                    @if ($errors-&gt;has('text6'))\r\n                        &lt;p class='error-string'&gt;{{ $errors-&gt;first('text6') }}&lt;\/p&gt;\r\n                    @endif\r\n                &lt;\/div&gt;\r\n                {!! Form::submit('\u767b\u9332', ['class' =&gt; 'btn btn-primary btn-block']) !!}\r\n            &lt;\/div&gt;\r\n        {!! Form::close() !!}\r\n<\/pre>\n<p>$errors-&gt;has\u3067\u305d\u306e\u9805\u76ee\u306b\u30a8\u30e9\u30fc\u304c\u3042\u308b\u304b\u30c1\u30a7\u30c3\u30af\u3057\u3001\u3042\u308b\u306e\u3067\u3042\u308c\u3070\u3001$errors-&gt;first\u3067\u6700\u521d\u306e1\u4ef6\u3092\u53d6\u308a\u51fa\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306f\u4f7f\u3044\u307e\u305b\u3093\u304c\u3001\u5168\u90e8\u306e\u30a8\u30e9\u30fc\u3092\u53d6\u308a\u51fa\u3057\u305f\u3051\u308c\u3070$errors-&gt;all\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<div class=\"yellowbox\">\n<p>@if ($errors-&gt;has(&#8216;text1&#8242;))<br \/>\n&lt;p class=&#8217;error-string&#8217;&gt;{{ $errors-&gt;first(&#8216;text1&#8217;) }}&lt;\/p&gt;<br \/>\n@endif<\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<h2>\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/h2>\n<p>\u4eca\u56de\u89e3\u8aac\u3057\u305f\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0\u3092GitHub\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u307e\u3057\u305f\u3002<\/p>\n<p><a href=\"https:\/\/github.com\/SadayoshiSaito\/validate_sample\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/SadayoshiSaito\/validate_sample<\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30d7\u30ed\u30df\u30c7\u30a3\u30a2\u5408\u540c\u4f1a\u793e\u306e\u6589\u85e4\u3067\u3059\u3002 \u4eca\u56de\u306fPHP Laravel\u3092\u4f7f\u3063\u3066\u3001\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u3092\u5b9f\u88c5\u3059\u308b\u65b9\u6cd5\u3092\u89e3\u8aac\u3057\u307e\u3059\u3002 \u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u306f\u3001\u307b\u3068\u3093\u3069\u306eWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067\u4f7f\u308f\u308c\u308b\u6a5f\u80fd\u3067\u3059\u306e\u3067\u3001\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3093\u3067\u7406\u89e3\u3092\u6df1\u3081\u3066\u304f [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":2502,"comment_status":"open","ping_status":"open","sticky":false,"template":"page-templates\/right-sidebar.php","format":"standard","meta":[],"categories":[65,66],"tags":[],"_links":{"self":[{"href":"https:\/\/promidea.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/2500"}],"collection":[{"href":"https:\/\/promidea.co.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/promidea.co.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/promidea.co.jp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/promidea.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2500"}],"version-history":[{"count":17,"href":"https:\/\/promidea.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/2500\/revisions"}],"predecessor-version":[{"id":2524,"href":"https:\/\/promidea.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/2500\/revisions\/2524"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/promidea.co.jp\/index.php?rest_route=\/wp\/v2\/media\/2502"}],"wp:attachment":[{"href":"https:\/\/promidea.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2500"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/promidea.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2500"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/promidea.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2500"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}