{"id":4923,"date":"2019-11-08T04:39:00","date_gmt":"2019-11-07T19:39:00","guid":{"rendered":"https:\/\/blog.capilano-fw.com\/?p=4923"},"modified":"2019-11-08T04:39:00","modified_gmt":"2019-11-07T19:39:00","slug":"laravel%e3%81%aeformrequest%e3%81%abaccessor%e6%a9%9f%e8%83%bd%e3%82%92%e3%81%a4%e3%81%91%e3%82%8b","status":"publish","type":"post","link":"https:\/\/blog.capilano-fw.com\/?p=4923","title":{"rendered":"Laravel\u306eFormRequest\u306baccessor\u6a5f\u80fd\u3092\u3064\u3051\u308b"},"content":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u3053\u3053\u306e\u3068\u3053\u308d<code>Laravel<\/code>\u306e\u8a18\u4e8b\u304b\u3089\u9060\u3056\u304b\u3063\u3066\u3057\u307e\u3063\u305f\u306e\u3067\u3001\u3053\u306e\u8fba\u3067\u524d\u304b\u3089\u4e00\u5ea6\u4f5c\u3063\u3066\u307f\u305f\u304b\u3063\u305f\u300c\u3061\u3087\u3063\u3068\u3057\u305f\u6a5f\u80fd\u300d\u3092\u3064\u304f\u3063\u3066\u307f\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u308c\u306f\u3001\u3053\u306e\u9593\u516c\u958b\u3057\u305f\u300c<a href=\"https:\/\/blog.capilano-fw.com\/?p=579\">\u5b8c\u5168\u306a\u624b\u9806\uff01Laravel\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u524d\u306b\u30c7\u30fc\u30bf\u3092\u52a0\u5de5\u3059\u308b\u65b9\u6cd5<\/a>\u300d\u304c\u5143\u30cd\u30bf\u306b\u306a\u3063\u3066\u3044\u308b\u306e\u3067\u3059\u304c\u3001\u7c21\u5358\u306b\u3069\u3046\u3044\u3046\u6a5f\u80fd\u304b\u3068\u8a00\u3046\u3068\u3001<\/p>\n<p><strong style=\"font-size: 35px;\">\u9001\u4fe1\u3055\u308c\u3066\u304d\u305f\u5024\u3092accessor\u306e\u3088\u3046\u306b\u7c21\u5358\u306b\u52a0\u5de5\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b<\/strong><\/p>\n<p>\u3068\u3044\u3046\u3082\u306e\u3067\u3059\u3002<\/p>\n<p><code>Laravel<\/code>\u3092\u3088\u304f\u4f7f\u3046\u65b9\u306a\u3089\u3054\u5b58\u77e5\u3060\u3068\u601d\u3046\u306e\u3067\u3059\u304c\u3001<code>accessor<\/code>\u3068\u306f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u5024\u3092\u7c21\u5358\u306b\u52a0\u5de5\u3067\u304d\u308b\u5f37\u529b\u306a\u6a5f\u80fd\u3067\u3001\u4f8b\u3048\u3070\u540d\u5b57\u3068\u540d\u524d\u3092\u7d50\u5408\u3057\u305f<code>full_name<\/code>\u3068\u3044\u3046\u5024\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f\u3001\u30e2\u30c7\u30eb\u5185\u306b<code>get****Attribute()<\/code>\u3068\u3044\u3046\u30e1\u30bd\u30c3\u30c9\u3092\u8ffd\u52a0\u3059\u308b\u3053\u3068\u3067\u6709\u52b9\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre>&lt;?php\r\n\r\nnamespace App;\r\n\r\n\/\/ \u7701\u7565\r\n\r\nclass User extends Authenticatable\r\n{\r\n    \/\/ \u7701\u7565\r\n\r\n    \/\/ Accessor\r\n    <strong>public function getFullNameAttribute() {<\/strong>\r\n\r\n<strong>        return $this-&gt;last_name .' '. $this-&gt;first_name;<\/strong>\r\n\r\n<strong>    }<\/strong>\r\n}<\/pre>\n<p>\u4f7f\u3044\u65b9\u306f\u3053\u3046\u3067\u3059\u3002<\/p>\n<pre>$user = \\App\\User::find(1);\r\necho <strong>$user-&gt;full_name;<\/strong> \/\/ \u5143\u3005\u5b58\u5728\u3057\u3066\u3044\u306a\u3044 \"full_name\" \u304c\u4f7f\u3048\u308b\uff01<\/pre>\n<p>\u203b \u3064\u307e\u308a\u3001\u6bce\u56de\u7d50\u5408\u3059\u308b\u30b3\u30fc\u30c9\u3092\u66f8\u304b\u306a\u304f\u3066\u3082\u3044\u3044\u308f\u3051\u3067\u3059\u306d\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001\u305a\u3063\u3068\u524d\u304b\u3089\u3053\u306e\u6a5f\u80fd\u304c<code>FormRequest<\/code>\u306b\u3082\u307b\u3057\u3044\u306a\u3068\u8003\u3048\u3066\u3044\u305f\u3093\u3067\u3059\u3002\u5143\u30cd\u30bf\u306e\u8a18\u4e8b\u3067\u306f<code>all()<\/code>\u3092\u4e0a\u66f8\u304d\u3059\u308b\u5f62\u3067\u5b9f\u88c5\u3057\u307e\u3057\u305f\u304c\u3001\u4fdd\u5b88\u7ba1\u7406\u306f<code>acessor<\/code>\u5f62\u5f0f\u306e\u65b9\u304c\u305a\u3063\u3068\u3044\u3044\u3068\u601d\u3063\u305f\u3093\u3067\u3059\u3002<\/p>\n<p>\u305d\u3053\u3067\uff01<\/p>\n<p>\u4eca\u56de\u306f\u3001<code>FormRequest<\/code>\u5185\u3067<code>accessor<\/code>\u304c\u4f7f\u3048\u308b\u3088\u3046\u306b\u3059\u308b\u65b9\u6cd5\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002\uff08\u3044\u3064\u3082\u4ee5\u4e0a\u306b\u7c21\u5358\u306b\u3067\u304d\u307e\u3059\uff09<\/p>\n<p>\u305c\u3072\u7686\u3055\u3093\u306e\u304a\u5f79\u306b\u7acb\u3066\u308b\u3068\u5b09\u3057\u3044\u3067\u3059\ud83d\ude0a\u2728<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4445 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/08\/no_2.png\" alt=\"\" width=\"370\" height=\"310\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/08\/no_2.png 370w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/08\/no_2-300x251.png 300w\" sizes=\"auto, (max-width: 370px) 100vw, 370px\" \/><\/p>\n<p>\u958b\u767a\u74b0\u5883\uff1a Laravel 5.7<\/p>\n<h1>\u3084\u308a\u305f\u3044\u3053\u3068<\/h1>\n<p>\u5177\u4f53\u7684\u306b\u5b9f\u88c5\u3057\u305f\u3044\u6a5f\u80fd\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<ul>\n<li>FormRequest \u306e\u30c7\u30fc\u30bf\u3092\u52a0\u5de5\u3057\u3066\u53d6\u5f97\u3067\u304d\u308b<\/li>\n<li>\u52a0\u5de5\u3057\u305f\u30c7\u30fc\u30bf\u306f\u3001\u901a\u5e38\u901a\u308a\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u306b\u4f7f\u3048\u308b<\/li>\n<li>\u540c\u3058\u304f\u3001\u52a0\u5de5\u30c7\u30fc\u30bf\u306f $request-&gt;xxxxx;\u3068\u3057\u3066\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b<\/li>\n<\/ul>\n<p>\u3067\u306f\u5b9f\u884c\u3057\u3066\u307f\u307e\u3057\u3087\u3046\uff01<\/p>\n<h1>\u307e\u305a\u306f\u3001\u72ec\u81ea\u306eFormRequest\u3092\u3064\u304f\u308b<\/h1>\n<p>\u4eca\u56de\u306f\u30c6\u30b9\u30c8\u3068\u3057\u3066\u3001<code>TestRequest<\/code>\u3092\u3064\u304f\u3063\u3066\u8aac\u660e\u3092\u9032\u3081\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p>\u3067\u306f\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><strong>php artisan make:request TestRequest<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u3001<code>app\/Http\/Requests\/TestRequest.php<\/code>\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u308b\u306e\u3067\u3001\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u3044\u3066\u304a\u3044\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h1>accessor \u304c\u4f7f\u3048\u308b\u3088\u3046\u306b\u30c8\u30ec\u30a4\u30c8\u3092\u4f5c\u6210\u3059\u308b<\/h1>\n<p>\u6b21\u306b<code>TestRequest.php<\/code>\u3067<code>accessor<\/code>\u6a5f\u80fd\u304c\u4f7f\u3048\u308b\u3088\u3046\u306b\u72ec\u81ea\u306e\u300c\u30c8\u30ec\u30a4\u30c8\u300d\u3092\u4f5c\u308a\u307e\u3059<\/p>\n<p>\u203b \u30c8\u30ec\u30a4\u30c8\u3068\u3044\u3046\u306e\u306f\u3001\u3042\u308b\u7279\u5b9a\u306e\u6a5f\u80fd\u3092<code>PHP<\/code>\u30af\u30e9\u30b9\u306b\u8ffd\u52a0\u3059\u308b\u3082\u306e\u3067\u3001<code>Vue<\/code>\u3092\u4f7f\u3046\u4eba\u306a\u3089\u300c\u30df\u30c3\u30af\u30b9\u30a4\u30f3\u300d\u3068\u3044\u3046\u30a4\u30e1\u30fc\u30b8\u304c\u5206\u304b\u308a\u3084\u3059\u3044\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u3067\u306f\u3001<code>app\/FormRequestAppendable.php<\/code>\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u3092\u3064\u304f\u3063\u3066\u4e2d\u8eab\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><strong>&lt;?php<\/strong>\r\n\r\n<strong>namespace App;<\/strong>\r\n\r\n<strong>use Illuminate\\Support\\Str;<\/strong>\r\n\r\n<strong>trait FormRequestAppendable {<\/strong>\r\n\r\n<strong>    public function all($keys = null) {<\/strong>\r\n\r\n<strong>        $results = parent::all($keys);<\/strong>\r\n\r\n<strong>        foreach($this-&gt;appends as $append) {<\/strong>\r\n\r\n<strong>            $method = Str::camel('get_'. $append .'_attribute');<\/strong>\r\n\r\n<strong>            if(method_exists($this, $method)) {<\/strong>\r\n\r\n<strong>                $results[$append] = $this-&gt;{$method}($results);<\/strong>\r\n\r\n<strong>            }<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n\r\n<strong>        return $results;<\/strong>\r\n\r\n<strong>    }<\/strong>\r\n\r\n<strong>}<\/strong><\/pre>\n<p>\u3053\u306e\u4e2d\u3067\u306f\u3001<code>FormRequest<\/code>\u306e<code>all()<\/code>\u3092\u4e0a\u66f8\u304d\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u6d41\u308c\u3068\u3057\u3066\u306f\u3001\u521d\u671f\u5024\u3092<code>parent::all()<\/code>\u304b\u3089\u53d6\u5f97\u3057\u3001\u305d\u3053\u306b<code>$appends<\/code>\u3067\u6307\u5b9a\u3055\u308c\u305f<code>accessor<\/code>\u306e\u5024\u3092\u8ffd\u52a0\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h1>\u4f7f\u3044\u65b9<\/h1>\n<p>\u4f7f\u3044\u65b9\u3068\u3057\u3066\u306f<code>FormRequest<\/code>\u306b<code>$appends<\/code>\u3068\u3044\u3046\u30e1\u30f3\u30d0\u30fc\u5909\u6570\u3092\u4f5c\u308a\u3001\u305d\u308c\u306b\u8a72\u5f53\u3059\u308b<code>accessor<\/code>\u3092\u72ec\u81ea\u306b\u3064\u304f\u308b\u3060\u3051\u3067OK\u3067\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u3001\u300c\u6642\u300d\u300c\u5206\u300d\u3092\u7d50\u5408\u3057\u305f<code>time<\/code>\u3068\u3044\u3046\u5024\u3092\u3064\u304f\u308b\u306b\u306f\u3053\u306e\u3088\u3046\u306b\u3057\u307e\u3059\u3002\uff08<strong>\u592a\u5b57<\/strong>\u304c\u8ffd\u52a0\u3057\u305f\u90e8\u5206\u3067\u3059\uff09<\/p>\n<pre>&lt;?php\r\n\r\nnamespace App\\Http\\Requests;\r\n\r\n<strong>use App\\FormRequestAppendable;<\/strong>\r\nuse Illuminate\\Foundation\\Http\\FormRequest;\r\n\r\nclass TestRequest extends FormRequest\r\n{\r\n    <strong>use FormRequestAppendable;<\/strong>\r\n<strong>    protected $appends = ['time'];<\/strong>\r\n\r\n    \/\/ \u7701\u7565\r\n\r\n    \/\/ Accessor\r\n<strong>    public function getTimeAttribute($values) {<\/strong>\r\n\r\n<strong>        if($this-&gt;filled('hours', 'minutes')) {<\/strong>\r\n\r\n<strong>            return $values['hours'] .':'. $values['minutes'];<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n\r\n<strong>    }<\/strong>\r\n}<\/pre>\n<h1>\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u306b\u3064\u304b\u3048\u308b<\/h1>\n<p>\u5148\u307b\u3069<code>accessor<\/code>\u6a5f\u80fd\u3067\u3064\u304f\u3063\u305f\u5024<code>time<\/code>\u306f\u3001\u901a\u5e38\u306e\u30c7\u30fc\u30bf\u3068\u540c\u3058\u3088\u3046\u306b\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u306b\u3082\u4f7f\u3048\u307e\u3059\u3002<\/p>\n<pre>class TestRequest extends FormRequest\r\n{\r\n    \/\/ \u7701\u7565\r\n\r\n    public function rules()\r\n    {\r\n        return [\r\n            <strong>'time' =&gt; 'required|date_format:H:i'<\/strong>\r\n        ];\r\n    }<\/pre>\n<h1>\u30c7\u30fc\u30bf\u53d6\u5f97\u3082\u3067\u304d\u307e\u3059<\/h1>\n<p>\u4f8b\u3048\u3070\u3001\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u304c\u6210\u529f\u3057\u3066\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3067<code>time<\/code>\u306e\u5024\u3092\u53d6\u5f97\u3059\u308b\u306e\u3082\u3044\u3064\u3082\u3068\u540c\u3058\u4f7f\u3044\u65b9\u3067OK\u3067\u3059\u3002<\/p>\n<pre>class HomeController extends Controller\r\n{\r\n    public function store(TestRequest $request) {\r\n\r\n        echo <strong>$request-&gt;time; \/\/ \u6642\u30fb\u5206\u3092\u7d50\u5408\u3057\u305f\u30c7\u30fc\u30bf<\/strong>\r\n\r\n    }<\/pre>\n<h1>\u5143\u30c7\u30fc\u30bf\u306e\u52a0\u5de5\u306b\u3082\u4f7f\u3048\u308b<\/h1>\n<p>\u4eca\u56de\u306e\u30c8\u30ec\u30a4\u30c8\u306f\u3001\u65b0\u3057\u3044\u5024\u3092\u3064\u304f\u308b\u305f\u3081\u3060\u3051\u306e\u3082\u306e\u3067\u306f\u306a\u304f\u3001\u5143\u30c7\u30fc\u30bf\u306e\u52a0\u5de5\u306b\u3082\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u3001<code>name_kana<\/code>\u3068\u3044\u3046\u300c\u540d\u524d\u306e\u304b\u306a\u300d\u3092\u5165\u529b\u3059\u308b\u5834\u5408\u3067\u3001\u3053\u308c\u3092\u30ab\u30bf\u30ab\u30ca\u3067\u7d71\u4e00\u3057\u305f\u3044\u5834\u5408\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<pre>&lt;?php\r\n\r\n\/\/ \u7701\u7565\r\n\r\nclass TestRequest extends FormRequest\r\n{\r\n    use FormRequestAppendable;\r\n    <strong>protected $appends = ['name_kana'];<\/strong>\r\n\r\n    \/\/ \u7701\u7565\r\n\r\n    \/\/ Accessor\r\n    <strong>public function getNameKanaAttribute($values) {<\/strong>\r\n\r\n<strong>        return mb_convert_kana($values['name_kana'], 'C'); \/\/ \u30ab\u30bf\u30ab\u30ca\u3067\u7d71\u4e00<\/strong>\r\n\r\n<strong>    }<\/strong>\r\n}<\/pre>\n<p>\u304a\u75b2\u308c\u69d8\u3067\u3057\u305f\ud83d\ude0a\u2728<\/p>\n<h1>\u30d1\u30c3\u30b1\u30fc\u30b8\u5316\u3057\u307e\u3057\u305f<\/h1>\n<p>\u306f\u3058\u3081\u306f\u3001\u72ec\u81ea\u306b\u30c8\u30ec\u30a4\u30c8\u3092\u3064\u304f\u3063\u3066\u5b9f\u88c5\u3059\u308c\u3070\u3044\u3044\u304b\u306a\u3068\u3082\u601d\u3063\u305f\u3093\u3067\u3059\u304c\u3001\u6bce\u56de\u3053\u306e\u30c8\u30ec\u30a4\u30c8\u3092\u30b3\u30d4\u30da\u3059\u308b\u306e\u306f\u3081\u3093\u3069\u3046\u3067\u3059\u306e\u3067\u3001<code>composer<\/code>\u30d1\u30c3\u30b1\u30fc\u30b8\u3068\u3057\u3066\u516c\u958b\u3057\u307e\u3057\u305f\u3002\uff08MIT\u30e9\u30a4\u30bb\u30f3\u30b9\u3067\u3059\u306e\u3067\u3001\u81ea\u7531\u306b\u4f7f\u3063\u3066\u304f\u3060\u3055\u3044\uff09<\/p>\n<p><strong>GitHub:<\/strong> <a href=\"https:\/\/github.com\/SUKOHI\/FormRequestAppendable\" target=\"_blank\" rel=\"noopener noreferrer\">SUKOHI\/FormRequestAppendable<\/a><\/p>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre><strong>composer require sukohi\/form-request-appendable:1.*<\/strong><\/pre>\n<p>\u306a\u304a\u3001\u3053\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3067<code>accessor<\/code>\u6a5f\u80fd\u3092\u4f7f\u3046\u5834\u5408\u306f\u3001\u4eca\u56de\u8aac\u660e\u3057\u305f\u3082\u306e\u3068\u306f\u30cd\u30fc\u30e0\u30b9\u30da\u30fc\u30b9\u304c\u9055\u3063\u3066\u3044\u308b\u306e\u3067\u6c17\u3092\u3064\u3051\u3066\u304f\u3060\u3055\u3044\u3002\uff08\u305d\u306e\u4ed6\u306e\u4f7f\u3044\u65b9\u306f\u5168\u304f\u4e00\u7dd2\u3067\u3059\uff09<\/p>\n<pre>&lt;?php\r\n\r\nnamespace App\\Http\\Requests;\r\n\r\nuse Illuminate\\Foundation\\Http\\FormRequest;\r\n<strong>use Sukohi\\FormRequestAppendable\\FormRequestAppendable;<\/strong>\r\n\r\nclass TestRequest extends FormRequest\r\n{\r\n    \/\/ \u7701\u7565<\/pre>\n<h1>\u304a\u308f\u308a\u306b<\/h1>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u4eca\u56de\u306f<code>accessor<\/code>\u6a5f\u80fd\u3092<code>FormRequest<\/code>\u5185\u3067\u3082\u4f7f\u3048\u308b\u3088\u3046\u306b\u3057\u3066\u307f\u307e\u3057\u305f\u3002\u3053\u308c\u3067\u4fdd\u5b88\u7ba1\u7406\u3082\u3088\u308a\u826f\u304f\u306a\u308c\u3070\u5b09\u3057\u3044\u3067\u3059\u3002<\/p>\n<p>\u306a\u304a\u3001\u4eca\u56de\u306e<code>accessor<\/code>\u3067\u4f7f\u3048\u308b\u30b1\u30fc\u30b9\u3092\u307e\u3068\u3081\u3066\u307f\u307e\u3057\u305f\u3002<br \/>\n\u3053\u3061\u3089\u3082\u53c2\u8003\u306b\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u306d\u3002<\/p>\n<ul>\n<li>\u540d\u5b57\u3068\u540d\u524d\u3092\u7d50\u5408\u3057\u3066 &#8220;full_name&#8221; \u3092\u3064\u304f\u308b<\/li>\n<li>\u90f5\u4fbf\u756a\u53f7\u306e\u524d\u534a\u3068\u5f8c\u534a\u3092\u3064\u306a\u3052\u308b<\/li>\n<li>mb_convert_kana()\u3092\u4f7f\u3063\u3066\u5168\u89d2\u306e\u82f1\u6570\u5b57\u3092\u534a\u89d2\u306b\u7d71\u4e00\u3059\u308b<\/li>\n<li>\u65e5\u4ed8\u306e &#8220;\/&#8221; \u3092 &#8220;-&#8221; \u306b\u7f6e\u304d\u63db\u3048\u308b<\/li>\n<li>\u30ab\u30ca\u30ab\u30ca\u3067\u7d71\u4e00\u3059\u308b<\/li>\n<\/ul>\n<p>\u306a\u3069\u306a\u3069<\/p>\n<p>\u305c\u3072\u7686\u3055\u3093\u3082\u4f7f\u3063\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u306d\u3002<\/p>\n<p>\u3067\u306f\u3067\u306f\u301c\uff01<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2595 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/11\/7.png\" alt=\"\" width=\"226\" height=\"320\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/11\/7.png 226w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/11\/7-212x300.png 212w\" sizes=\"auto, (max-width: 226px) 100vw, 226px\" \/><\/p>\n<p style=\"text-align: center;\">\u300c\u4e45\u3057\u3076\u308a\u306b\u72ec\u81ea\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u516c\u958b\u3057\u307e\u3057\u305f\ud83d\ude0a\u300d<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u3053\u3053\u306e\u3068\u3053\u308dLaravel\u306e\u8a18\u4e8b\u304b\u3089\u9060\u3056\u304b\u3063\u3066\u3057\u307e\u3063\u305f\u306e\u3067\u3001\u3053\u306e\u8fba\u3067\u524d\u304b\u3089\u4e00\u5ea6\u4f5c\u3063\u3066\u307f\u305f\u304b\u3063\u305f\u300c\u3061\u3087\u3063\u3068\u3057\u305f\u6a5f\u80fd\u300d\u3092\u3064\u304f\u3063\u3066\u307f\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002 \u305d\u308c &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.capilano-fw.com\/?p=4923\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;Laravel\u306eFormRequest\u306baccessor\u6a5f\u80fd\u3092\u3064\u3051\u308b&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":4927,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[86],"class_list":["post-4923","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-laravel","tag-accessor"],"_links":{"self":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/4923","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4923"}],"version-history":[{"count":3,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/4923\/revisions"}],"predecessor-version":[{"id":4926,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/4923\/revisions\/4926"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/media\/4927"}],"wp:attachment":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4923"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4923"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4923"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}