{"id":3161,"date":"2020-06-02T11:39:51","date_gmt":"2020-06-02T02:39:51","guid":{"rendered":"http:\/\/taki-lab.site\/bocci\/?p=3161"},"modified":"2020-06-02T11:39:54","modified_gmt":"2020-06-02T02:39:54","slug":"%e3%80%90laravel%e3%80%91%e3%80%90%e3%83%80%e3%82%a4%e3%82%a8%e3%83%83%e3%83%88%e6%94%af%e6%8f%b4%e3%80%91%e3%83%87%e3%83%bc%e3%82%bf%e4%b8%80%e8%a6%a7%e7%94%bb%e9%9d%a2%e3%81%8b%e3%82%89%e3%83%87-3","status":"publish","type":"post","link":"https:\/\/taki-lab.site\/bocci\/?p=3161","title":{"rendered":"\u3010LARAVEL\u3011\u3010\u30c0\u30a4\u30a8\u30c3\u30c8\u652f\u63f4\u3011\u30c7\u30fc\u30bf\u4e00\u89a7\u753b\u9762\u304b\u3089\u30c7\u30fc\u30bf\u524a\u9664"},"content":{"rendered":"\n<p>\u524d\u56de\u307e\u3067\u306e\u72b6\u6cc1\u306f\u3053\u3061\u3089\u3002<\/p>\n\n\n\n<figure class=\"wp-block-embed-wordpress wp-block-embed is-type-wp-embed is-provider-\u81ea\u5206\u3001\u307c\u3063\u3061\u3067\u3059\u304c\u4f55\u304b\uff1f\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"cPZCdwKksq\"><a href=\"https:\/\/taki-lab.site\/bocci\/?p=3152\">\u3010LARAVEL\u3011\u3010\u30c0\u30a4\u30a8\u30c3\u30c8\u652f\u63f4\u3011\u30c7\u30fc\u30bf\u4e00\u89a7\u753b\u9762\u304b\u3089\u30c7\u30fc\u30bf\u66f4\u65b0<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;\u3010LARAVEL\u3011\u3010\u30c0\u30a4\u30a8\u30c3\u30c8\u652f\u63f4\u3011\u30c7\u30fc\u30bf\u4e00\u89a7\u753b\u9762\u304b\u3089\u30c7\u30fc\u30bf\u66f4\u65b0&#8221; &#8212; \u81ea\u5206\u3001\u307c\u3063\u3061\u3067\u3059\u304c\u4f55\u304b\uff1f\" src=\"https:\/\/taki-lab.site\/bocci\/?p=3152&#038;embed=true#?secret=qH8GgU5bAl#?secret=cPZCdwKksq\" data-secret=\"cPZCdwKksq\" width=\"474\" height=\"267\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>\u6700\u65b0\u30bd\u30fc\u30b9\u306f\u3053\u3061\u3089(gitHub)<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/takishita2nd\/diet-mng\">https:\/\/github.com\/takishita2nd\/diet-mng<\/a><\/p>\n\n\n\n<p>\u30c7\u30fc\u30bf\u524a\u9664\u51e6\u7406\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3068\u306f\u3044\u3063\u3066\u3082\u3001\u3082\u3046\u8ffd\u52a0\u3001\u7de8\u96c6\u51e6\u7406\u304c\u51fa\u6765\u4e0a\u304c\u3063\u3066\u3044\u308b\u306e\u3067\u3001\u305d\u3093\u306a\u306b\u96e3\u3057\u304f\u3042\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u3071\u3071\u3063\u3068\u3084\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>    public function delete($id, $user)\n    {\n        $model = $this->getItemById($id);\n        $this->detachToUser($model, $user);\n        $model->delete();\n    }\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>    \/**\n     * \u30c7\u30fc\u30bf\u3092\uff11\u4ef6\u524a\u9664\u3059\u308b\n     *\/\n    public function delete(Request $request)\n    {\n        $this->weightManagement->delete($request->contents&#91;\"id\"], Auth::user());\n        \n        return response()->json();\n    }\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Route::post('api\/weight\/delete', 'Weight\\ApiController@delete');\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;template>\n    &lt;div>\n        &lt;div id=\"overlay\" v-show=\"show\">\n            &lt;div id=\"content\">\n                &lt;p v-if=\"error_flg == true\" class=\"error\">\n                    &lt;ui>\n                        &lt;li v-for=\"error in errors\">{{ error }}&lt;\/li>\n                    &lt;\/ui>\n                &lt;\/p>\n                &lt;table class=\"edit\">\n                    &lt;tbody>\n                        &lt;tr>\n                            &lt;td>\u65e5\u6642&lt;\/td>\n                            &lt;td>{{contents.date}}&lt;\/td>\n                        &lt;\/tr>\n                        &lt;tr>\n                            &lt;td>\u4f53\u91cd&lt;\/td>\n                            &lt;td>{{contents.weight}}&lt;\/td>\n                        &lt;\/tr>\n                        &lt;tr>\n                            &lt;td>\u4f53\u8102\u80aa&lt;\/td>\n                            &lt;td>{{contents.fat_rate}}&lt;\/td>\n                        &lt;\/tr>\n                        &lt;tr>\n                            &lt;td>BMI&lt;\/td>\n                            &lt;td>{{contents.bmi}}&lt;\/td>\n                        &lt;\/tr>\n                    &lt;\/tbody>\n                &lt;\/table>\n                &lt;p id=\"command\">\n                    &lt;button @click=\"clickDelete\">OK&lt;\/button>\n                    &lt;button @click=\"closeModal\">\u30ad\u30e3\u30f3\u30bb\u30eb&lt;\/button>\n                &lt;\/p>\n            &lt;\/div>\n        &lt;\/div>\n    &lt;\/div>\n&lt;\/template>\n&lt;script>\nexport default {\n    props: &#91;'show'],\n    data() {\n        return {\n            errors: &#91;],\n            error_flg: &#91;],\n            param: {},\n            contents: {\n                date: \"\",\n                weight: \"\",\n                fat_rate: \"\",\n                bmi: \"\",\n            },\n        };\n    },\n    created: function() {\n    },\n    methods: {\n        dataSet: function(data) {\n            this.contents = data;\n        },\n        clickDelete: function() {\n            var self = this;\n            this.param.contents = this.contents;\n            axios.post('api\/weight\/delete', this.param).then(function(response){\n                self.closeModal();\n                self.$emit('update');\n            }).catch(function(error){\n                self.error_flg = true;\n                self.errors = error.response.data.errors;\n            });\n        },\n        closeModal: function() {\n            this.$parent.showDeleteDialogContent = false;\n        },\n    }\n}\n&lt;\/script><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>            &lt;weight-delete-dialog-component ref=\"deleteDialog\" :show=\"showDeleteDialogContent\" @update=\"invokeUpdateList\">&lt;\/weight-delete-dialog-component>\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>        onClickDelete: function(id) {\n            var editData = {};\n            this.datalists.forEach(element => {\n                if(element.id == id){\n                    editData.id = id;\n                    editData.date = element.date;\n                    editData.weight = element.weight;\n                    editData.fat_rate = element.fat_rate;\n                    editData.bmi = element.bmi;\n                    return true;\n                }\n            });\n            this.$refs.deleteDialog.dataSet(editData);\n            this.showDeleteDialogContent = true;\n        },\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-video\"><video height=\"1080\" style=\"aspect-ratio: 1920 \/ 1080;\" width=\"1920\" controls src=\"http:\/\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/06\/20200602112305.mp4\"><\/video><\/figure>\n\n\n\n<p>\u3044\u3044\u304b\u3093\u3058\u3067\u3059\u3002<\/p>\n\n\n\n<a href=\"\/\/blog.with2.net\/link\/?2023426:1010\" target=\"_blank\" rel=\"noopener noreferrer\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2019\/12\/03a6eee54039f74ded0b8f7548b1868f.png?w=474\" title=\"\u30d1\u30bd\u30b3\u30f3\u30e9\u30f3\u30ad\u30f3\u30b0\"><\/a>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u56de\u307e\u3067\u306e\u72b6\u6cc1\u306f\u3053\u3061\u3089\u3002 \u6700\u65b0\u30bd\u30fc\u30b9\u306f\u3053\u3061\u3089(gitHub) https:\/\/github.com\/takishita2nd\/diet-mng \u30c7\u30fc\u30bf\u524a\u9664\u51e6\u7406\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002 \u3068\u306f\u3044\u3063\u3066\u3082\u3001\u3082\u3046\u8ffd\u52a0\u3001\u7de8\u96c6\u51e6\u7406\u304c\u51fa\u6765\u4e0a\u304c\u3063\u3066 &hellip; <a href=\"https:\/\/taki-lab.site\/bocci\/?p=3161\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">\u3010LARAVEL\u3011\u3010\u30c0\u30a4\u30a8\u30c3\u30c8\u652f\u63f4\u3011\u30c7\u30fc\u30bf\u4e00\u89a7\u753b\u9762\u304b\u3089\u30c7\u30fc\u30bf\u524a\u9664<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[167,3],"tags":[138,192],"class_list":["post-3161","post","type-post","status-publish","format-standard","hentry","category-laravel","category-3","tag-laravel","tag-192"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8SDbY-OZ","jetpack-related-posts":[{"id":3903,"url":"https:\/\/taki-lab.site\/bocci\/?p=3903","url_meta":{"origin":3161,"position":0},"title":"\u3010\u30c0\u30a4\u30a8\u30c3\u30c8\u652f\u63f4\u3011\u3010\u98df\u4e8b\u7ba1\u7406\u3011\u30c7\u30fc\u30bf\u524a\u9664\u30c0\u30a4\u30a2\u30ed\u30b0\u51e6\u7406\u3092\u4f5c\u6210\u3059\u308b\u3002","author":"taki","date":"2020\u5e748\u670820\u65e5","format":false,"excerpt":"\u524d\u56de\u307e\u3067\u306e\u72b6\u6cc1\u306f\u3053\u3061\u3089 https:\/\/taki-lab.site\/bocci\/?p=3863 \u6700\u65b0\u2026","rel":"","context":"Laravel","block_context":{"text":"Laravel","link":"https:\/\/taki-lab.site\/bocci\/?cat=167"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/08\/Screenshot-from-2020-08-20-08-53-32.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/08\/Screenshot-from-2020-08-20-08-53-32.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/08\/Screenshot-from-2020-08-20-08-53-32.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/08\/Screenshot-from-2020-08-20-08-53-32.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/08\/Screenshot-from-2020-08-20-08-53-32.png?resize=1050%2C600&ssl=1 3x"},"classes":[]},{"id":4454,"url":"https:\/\/taki-lab.site\/bocci\/?p=4454","url_meta":{"origin":3161,"position":1},"title":"\u3010\u30c0\u30a4\u30a8\u30c3\u30c8\u652f\u63f4\u3011\u3010\u5165\u529b\u5c65\u6b74\u6a5f\u80fd\u3011\u5c65\u6b74\u7ba1\u7406\u753b\u9762\u306e\u4f5c\u6210","author":"taki","date":"2020\u5e7411\u67081\u65e5","format":false,"excerpt":"https:\/\/taki-lab.site\/bocci\/?p=4346 \u7279\u306b\u7279\u7b46\u3059\u308b\u3053\u3068\u306f\u3084\u3063\u3066\u3044\u306a\u2026","rel":"","context":"Laravel","block_context":{"text":"Laravel","link":"https:\/\/taki-lab.site\/bocci\/?cat=167"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/11\/146aa2bedc0e543ec56ae78a911ffc1c.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/11\/146aa2bedc0e543ec56ae78a911ffc1c.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/11\/146aa2bedc0e543ec56ae78a911ffc1c.png?resize=525%2C300 1.5x, https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/11\/146aa2bedc0e543ec56ae78a911ffc1c.png?resize=700%2C400 2x, https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/11\/146aa2bedc0e543ec56ae78a911ffc1c.png?resize=1050%2C600 3x"},"classes":[]},{"id":3821,"url":"https:\/\/taki-lab.site\/bocci\/?p=3821","url_meta":{"origin":3161,"position":2},"title":"\u3010\u30c0\u30a4\u30a8\u30c3\u30c8\u652f\u63f4\u3011\u3010\u98df\u4e8b\u7ba1\u7406\u3011\u30c7\u30fc\u30bf\u8a73\u7d30\u304b\u3089\u5165\u529b\u51e6\u7406\u3092\u4f5c\u6210\u3059\u308b\u3002","author":"taki","date":"2020\u5e748\u67088\u65e5","format":false,"excerpt":"\u524d\u56de\u307e\u3067\u306e\u72b6\u6cc1\u306f\u3053\u3061\u3089\u3002 https:\/\/taki-lab.site\/bocci\/?p=3791 \u6700\u2026","rel":"","context":"Laravel","block_context":{"text":"Laravel","link":"https:\/\/taki-lab.site\/bocci\/?cat=167"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/08\/Screenshot-from-2020-08-08-08-59-13.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/08\/Screenshot-from-2020-08-08-08-59-13.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/08\/Screenshot-from-2020-08-08-08-59-13.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/08\/Screenshot-from-2020-08-08-08-59-13.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/08\/Screenshot-from-2020-08-08-08-59-13.png?resize=1050%2C600&ssl=1 3x"},"classes":[]},{"id":1732,"url":"https:\/\/taki-lab.site\/bocci\/?p=1732","url_meta":{"origin":3161,"position":3},"title":"\u3010Laravel\u3011\u30c6\u30fc\u30d6\u30eb\u306e\u30c7\u30fc\u30bf\u3092\u524a\u9664\u3059\u308b","author":"taki","date":"2019\u5e7411\u670825\u65e5","format":false,"excerpt":"\u524d\u56de\u307e\u3067\u306e\u69d8\u5b50\u306f\u3053\u3061\u3089 https:\/\/taki-lab.site\/bocci\/?p=1722 \u304a\u6b21\u2026","rel":"","context":"Linux","block_context":{"text":"Linux","link":"https:\/\/taki-lab.site\/bocci\/?cat=8"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2019\/11\/Screenshot-from-2019-11-25-08-53-11.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":3352,"url":"https:\/\/taki-lab.site\/bocci\/?p=3352","url_meta":{"origin":3161,"position":4},"title":"\u3010LARAVEL\u3011\u3010\u30c0\u30a4\u30a8\u30c3\u30c8\u652f\u63f4\u3011\u30b0\u30e9\u30d5\u306e\u30c7\u30fc\u30bf\u9593\u9694\u3092\u6307\u5b9a\u3059\u308b","author":"taki","date":"2020\u5e746\u670823\u65e5","format":false,"excerpt":"\u524d\u56de\u307e\u3067\u306e\u72b6\u6cc1\u306f\u3053\u3061\u3089\u3002 http:\/\/taki-lab.site\/bocci\/?p=3296 \u6700\u65b0\u2026","rel":"","context":"Laravel","block_context":{"text":"Laravel","link":"https:\/\/taki-lab.site\/bocci\/?cat=167"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/06\/Screenshot-from-2020-06-23-08-33-15.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/06\/Screenshot-from-2020-06-23-08-33-15.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/06\/Screenshot-from-2020-06-23-08-33-15.png?resize=525%2C300 1.5x"},"classes":[]},{"id":3148,"url":"https:\/\/taki-lab.site\/bocci\/?p=3148","url_meta":{"origin":3161,"position":5},"title":"\u3010LARAVEL\u3011\u3010\u30c0\u30a4\u30a8\u30c3\u30c8\u652f\u63f4\u3011\u30c7\u30fc\u30bf\u4e00\u89a7\u753b\u9762\u304b\u3089\u30c7\u30fc\u30bf\u5165\u529b","author":"taki","date":"2020\u5e745\u670831\u65e5","format":false,"excerpt":"\u524d\u56de\u307e\u3067\u306e\u72b6\u6cc1\u306f\u3053\u3061\u3089\u3002 https:\/\/taki-lab.site\/bocci\/?p=3117 \u6700\u2026","rel":"","context":"Laravel","block_context":{"text":"Laravel","link":"https:\/\/taki-lab.site\/bocci\/?cat=167"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/05\/Screenshot-from-2020-05-31-11-56-25.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/05\/Screenshot-from-2020-05-31-11-56-25.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/05\/Screenshot-from-2020-05-31-11-56-25.png?resize=525%2C300 1.5x, https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/05\/Screenshot-from-2020-05-31-11-56-25.png?resize=700%2C400 2x"},"classes":[]}],"jetpack_likes_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=\/wp\/v2\/posts\/3161","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3161"}],"version-history":[{"count":1,"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=\/wp\/v2\/posts\/3161\/revisions"}],"predecessor-version":[{"id":3162,"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=\/wp\/v2\/posts\/3161\/revisions\/3162"}],"wp:attachment":[{"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3161"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3161"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3161"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}