{"id":10057,"date":"2022-02-21T07:00:02","date_gmt":"2022-02-20T22:00:02","guid":{"rendered":"https:\/\/blog.capilano-fw.com\/?p=10057"},"modified":"2022-02-24T02:13:51","modified_gmt":"2022-02-23T17:13:51","slug":"laravel-%e3%81%a7-alpine-js-%e3%82%92%e4%bd%bf%e3%81%86-%e3%80%9c-%e3%82%88%e3%82%8a%e3%82%b7%e3%83%b3%e3%83%97%e3%83%ab%e3%82%92%e6%b1%82%e3%82%81%e3%81%a6%ef%bc%93-%e3%80%9c","status":"publish","type":"post","link":"https:\/\/blog.capilano-fw.com\/?p=10057","title":{"rendered":"Laravel \u3067 Alpine.js \u3092\u4f7f\u3046 \u301c \u3088\u308a\u30b7\u30f3\u30d7\u30eb\u3092\u6c42\u3081\u3066\uff13 \u301c"},"content":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u5c11\u3057\u524d\u306b\u516c\u958b\u3057\u305f<strong>\u00a0<a href=\"https:\/\/blog.capilano-fw.com\/?p=9987\">Laravel \u3067 Svelte \u3092\u4f7f\u3046 \u301c \u3088\u308a\u30b7\u30f3\u30d7\u30eb\u3092\u6c42\u3081\u3066\uff12 \u301c<\/a>\u00a0<\/strong>\u3068\u3044\u3046\u8a18\u4e8b\u3067\u306f\u3001\u6700\u8fd1\u3088\u304f\u898b\u304b\u3051\u308b\u3088\u3046\u306b\u306a\u3063\u305f<code>Svelte<\/code>\u3092\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u3059\u308b\u3068\u3001\u5b09\u3057\u3044\u3053\u3068\u306b\u30c4\u30a4\u30c3\u30bf\u30fc\u3067 <strong><a href=\"https:\/\/twitter.com\/shiro_cake\" target=\"_blank\" rel=\"noopener\">shirocake<\/a><\/strong> \u3055\u3093\u304b\u3089\u300c<strong>Alpine.js \u306f\u6bd4\u8f03\u7684\u30b7\u30f3\u30d7\u30eb\u3067\u3059\u3088<\/strong>\u300d\u3068\u3044\u3046\u60c5\u5831\u3092\u3044\u305f\u3060\u3044\u305f\u306e\u3067\u4eca\u56de\u306f <a href=\"https:\/\/alpinejs.dev\/\" target=\"_blank\" rel=\"noopener\">Alpine.js<\/a> \u3092\u4f7f\u3063\u3066\u30b7\u30f3\u30d7\u30eb\u63a2\u7d22\u3092\u3057\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u3061\u306a\u307f\u306b\u3001<code>Alpine.js<\/code>\u306f<code>Vue.js<\/code>\u306b\u5f71\u97ff\u3092\u53d7\u3051\u3066\u3064\u304f\u3089\u308c\u305f\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u3001\u66f8\u304d\u65b9\u304c\u30db\u30f3\u30c8\u306b\u3088\u304f\u4f3c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u3001\u53cb\u9054\u306e\u5bb6\u306b\u884c\u3063\u3066\u5e74\u306e\u8fd1\u3044\u5f1f\u304c\u3044\u305f\u3089\u3001\u300c<strong>\u3046\u308f\u3063\u3001\u4f3c\u3066\u308b\u306a\u30fc\ud83d\ude33<\/strong>\u300d\u3063\u3066\u306a\u308b\u3088\u3046\u306a\u30a4\u30e1\u30fc\u30b8\u3067\u3059\uff08\u7b11\uff09<\/p>\n<p>\u5b9f\u969b\u306b\u306f\u3001<code><strong>v<\/strong>-if<\/code> \u2192\u00a0<code><strong>x<\/strong>-if<\/code>\u306b\u306a\u308b\u306a\u3069\u3001\u307b\u307c<code>v<\/code>\u306e\u90e8\u5206\u304c<code>x<\/code>\u306b\u7f6e\u304d\u63db\u308f\u3063\u305f\u3060\u3051\u306a\u306e\u3067<code>Vue.js<\/code>\u3067\u306e\u958b\u767a\u304c\u3042\u308c\u3070\u3059\u3050\u306b\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u308b\u3068\u601d\u3044\u307e\u3059\u3088\u3002<\/p>\n<p>\u305d\u3053\u3067\u2757<\/p>\n<p>\u4eca\u56de\u306f\u524d\u56de\u3068\u540c\u69d8\u306b<code>Laravel + Alpine.js<\/code>\u3067<code>CRUD<\/code>\uff08\u767b\u9332\u3001\u8868\u793a\u3001\u5909\u66f4\u3001\u524a\u9664\uff09\u3092\u5b9f\u88c5\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<p>\u305c\u3072\u4f55\u304b\u306e\u53c2\u8003\u306b\u306a\u308a\u307e\u3057\u305f\u3089\u5b09\u3057\u3044\u3067\u3059\u3002\ud83d\ude04\u2728<\/p>\n<p><strong>\u3010\u8ffd\u8a18\uff1a2022.02.24\u3011<br \/>\nshirocake \u3055\u3093<\/strong>\u304b\u3089<code>getter<\/code>\u3092\u4f7f\u3046\u65b9\u6cd5\u3092\u6559\u3048\u3066\u3044\u305f\u3060\u3044\u305f\u306e\u3067\u30b3\u30fc\u30c9\u3092\u5c11\u3057\u5909\u66f4\u3057\u307e\u3057\u305f\u3002<code>getter<\/code>\u3092\u4f7f\u3046\u3068\u5909\u6570\u306e\u3088\u3046\u306b\u4f7f\u3048\u307e\u3059\u3002\u518d\u5ea6\u3042\u308a\u304c\u3068\u3046\u3054\u3056\u3044\u307e\u3059\u3002m(_ _)m<\/p>\n<p style=\"text-align: center;\"><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\" \/>\u300c\u8cb4\u91cd\u306a\u60c5\u5831<br \/>\n\u3042\u308a\u304c\u3068\u3046\u3054\u3056\u3044\u307e\u3059\u2757\u300d<\/p>\n<p><strong>\u958b\u767a\u74b0\u5883\uff1a<\/strong> Laravel 8.x\u3001Alpine.js 3.8.1\u3001axios 0.25.0<\/p>\n<h1>\u524d\u63d0\u3068\u3057\u3066<\/h1>\n<p>\u4eca\u56de\u3082\u524d\u56de\uff08&amp; \u524d\u3005\u56de\uff09\u3068\u540c\u3058\u304f<code>articles<\/code>\u30c6\u30fc\u30d6\u30eb\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<br \/>\n\u305d\u306e\u305f\u3081\u3001\u3082\u3057\u307e\u3060<code>articles<\/code>\u30c6\u30fc\u30d6\u30eb\u3092\u7528\u610f\u3057\u3066\u3044\u306a\u3044\u5834\u5408\u306f\u4ee5\u4e0b\u3092\u53c2\u8003\u306b\u3057\u3066\u4f5c\u6210\u3057\u3066\u304a\u3044\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\ud83d\udcdd\u00a0<strong>\u53c2\u8003\u30da\u30fc\u30b8\uff1a<\/strong>\u00a0<a href=\"https:\/\/blog.capilano-fw.com\/?p=9844#DB\" target=\"_blank\" rel=\"noopener\">Laravel + Livewire \u3067 CRUD \u3092\u5b9f\u88c5\u3057\u3066\u307f\u308b \u301c \u3088\u308a\u30b7\u30f3\u30d7\u30eb\u3092\u6c42\u3081\u3066 \u301c\uff1aDB\u307e\u308f\u308a\u3092\u7528\u610f\u3059\u308b<\/a><\/p>\n<p>\u306a\u304a\u3001\u5b9f\u969b\u306e\u30c6\u30fc\u30d6\u30eb\u306f\u3053\u3046\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9848\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/11\/laravel_livewire_crud_2.png\" alt=\"\" width=\"575\" height=\"509\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/11\/laravel_livewire_crud_2.png 575w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/11\/laravel_livewire_crud_2-300x266.png 300w\" sizes=\"auto, (max-width: 575px) 100vw, 575px\" \/><\/p>\n<h1>\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u3092\u3064\u304f\u308b<\/h1>\n<p>\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u3082\u524d\u56de\u3068\u5168\u304f\u540c\u3058\u306b\u306a\u308a\u307e\u3059\u306e\u3067\u3001\u4ee5\u4e0b\u3092\u53c2\u8003\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><strong>\ud83d\udcdd \u53c2\u8003\u30da\u30fc\u30b8\uff1a<\/strong>\u00a0<a href=\"https:\/\/blog.capilano-fw.com\/?p=9987#i-5\" target=\"_blank\" rel=\"noopener\">Laravel \u3067 Svelte \u3092\u4f7f\u3046 \u301c \u3088\u308a\u30b7\u30f3\u30d7\u30eb\u3092\u6c42\u3081\u3066\uff12 \u301c\uff1a\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3092\u3064\u304f\u308b<\/a><\/p>\n<h1>\u30d3\u30e5\u30fc\u3092\u3064\u304f\u308b<\/h1>\n<p>\u3055\u3041\u3001\u3053\u3053\u304b\u3089\u304c\u4eca\u56de\u306e\u30e1\u30a4\u30f3\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u5b9f\u969b\u306e\u30b3\u30fc\u30c9\u306f\u4ee5\u4e0b\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u203b \u306a\u304a\u3001\u4eca\u56de\u306f<code>Vue<\/code>\u3068\u306e\u6bd4\u8f03\u304c\u3057\u3084\u3059\u3044\u3088\u3046\u306b\u3001\u5909\u6570\u3084\u30e1\u30bd\u30c3\u30c9\u306f<code>Vue<\/code>\u3063\u307d\u304f\u4e26\u3079\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><strong>resources\/views\/article\/index.blade.php<\/strong><\/p>\n<pre>&lt;html&gt;\r\n&lt;head&gt;\r\n    &lt;link href=\"https:\/\/unpkg.com\/tailwindcss@^2\/dist\/tailwind.min.css\" rel=\"stylesheet\"&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n    &lt;div class=\"p-5\"&gt;\r\n        &lt;h1 class=\"text-3xl mb-4\"&gt;\r\n            Alpine.js \u306eCRUD\u30b5\u30f3\u30d7\u30eb\r\n        &lt;\/h1&gt;\r\n        &lt;div x-data=\"article\" x-init=\"getArticles\" class=\"grid grid-cols-2 gap-7\"&gt;\r\n            &lt;div&gt;\r\n                &lt;table class=\"w-full text-sm mb-5\"&gt;\r\n                    &lt;thead&gt;\r\n                    &lt;tr&gt;\r\n                        &lt;th class=\"border p-2\"&gt;\u30bf\u30a4\u30c8\u30eb&lt;\/th&gt;\r\n                        &lt;th class=\"border p-2\"&gt;\u672c\u6587&lt;\/th&gt;\r\n                        &lt;th class=\"border p-2\"&gt;\u64cd\u4f5c&lt;\/th&gt;\r\n                    &lt;\/tr&gt;\r\n                    &lt;\/thead&gt;\r\n                    &lt;tbody&gt;\r\n                    <strong>&lt;!-- \u2460 x-for \u3067\u30eb\u30fc\u30d7\u3057\u3066\u307e\u3059 --&gt;<\/strong>\r\n                    &lt;template <strong>x-for=\"article in articles\"<\/strong>&gt;\r\n                        &lt;tr&gt;\r\n                            &lt;td class=\"border px-2 py-1\" x-text=\"article.title\"&gt;&lt;\/td&gt;\r\n                            &lt;td class=\"border px-2 py-1\" x-text=\"article.content\"&gt;&lt;\/td&gt;\r\n                            &lt;td class=\"border px-2 py-1 text-right\"&gt;\r\n                                &lt;button\r\n                                    type=\"button\"\r\n                                    class=\"bg-yellow-500 text-yellow-50 rounded p-2 text-xs\"\r\n                                    @click=\"onEdit(article)\"&gt;\r\n                                    \u5909\u66f4\r\n                                &lt;\/button&gt;\r\n                                &lt;button\r\n                                    type=\"button\"\r\n                                    class=\"bg-red-600 text-red-50 rounded p-2 text-xs\"\r\n                                    @click=\"onDelete(article)\"&gt;\r\n                                    \u524a\u9664\r\n                                &lt;\/button&gt;\r\n                            &lt;\/td&gt;\r\n                        &lt;\/tr&gt;\r\n                    &lt;\/template&gt;\r\n                    &lt;\/tbody&gt;\r\n                &lt;\/table&gt;\r\n\r\n                <strong>&lt;!-- \u2461 x-show \u306f\u3001\u76f4\u63a5\u30bf\u30b0\u306b\u30bb\u30c3\u30c8\u3057\u3066\u3082 OK --&gt;<\/strong>\r\n                &lt;button\r\n                    type=\"button\"\r\n                    class=\"bg-blue-500 text-blue-50 rounded p-2 text-xs\"\r\n                    <strong>x-show=\"hasPrevPage\"<\/strong>\r\n                    @click=\"onMovePage('prev')\"&gt;\r\n                    \u524d\u3078\r\n                &lt;\/button&gt;\r\n                &lt;button\r\n                    type=\"button\"\r\n                    class=\"bg-blue-500 text-blue-50 rounded p-2 text-xs\"\r\n                    <strong>x-show=\"hasNextPage\"<\/strong>\r\n                    @click=\"onMovePage('next')\"&gt;\r\n                    \u6b21\u3078\r\n                &lt;\/button&gt;\r\n\r\n            &lt;\/div&gt;\r\n            &lt;div&gt;\r\n                &lt;div class=\"text-green-700 p-3 bg-green-300 rounded mb-3\" x-show=\"resultMessage\"&gt;\r\n                    <strong>&lt;!-- \u2462 x-text \u3067\u30c7\u30fc\u30bf\u3092\u8868\u793a\u3057\u307e\u3059 --&gt;<\/strong>\r\n                    &lt;span <strong>x-text=\"resultMessage\"<\/strong>&gt;&lt;\/span&gt;\r\n                &lt;\/div&gt;\r\n                &lt;div class=\"mb-3\"&gt;\r\n                    &lt;label for=\"title\"&gt;\u30bf\u30a4\u30c8\u30eb&lt;\/label&gt;\r\n                    &lt;br&gt;\r\n                    <strong>&lt;!-- \u2463 x-model \u3067\u53cc\u65b9\u5411\u30d0\u30a4\u30f3\u30c7\u30a3\u30f3\u30b0\u3057\u307e\u3059 --&gt;<\/strong>\r\n                    &lt;input id=\"title\" type=\"text\" class=\"border w-full p-1\"<strong> x-model=\"params.title\"<\/strong>&gt;\r\n                &lt;\/div&gt;\r\n                &lt;div class=\"mb-4\"&gt;\r\n                    &lt;label for=\"content\"&gt;\u672c\u6587&lt;\/label&gt;\r\n                    &lt;br&gt;\r\n                    &lt;textarea id=\"content\" rows=\"7\" class=\"border w-full p-1\" x-model=\"params.content\"&gt;&lt;\/textarea&gt;\r\n                &lt;\/div&gt;\r\n                <strong>&lt;!-- \u2464 @**** \u3067\u30a4\u30d9\u30f3\u30c8\u3092\u30bb\u30c3\u30c8\u3067\u304d\u307e\u3059 --&gt;<\/strong>\r\n                &lt;button type=\"submit\" class=\"bg-purple-700 text-purple-50 p-2 rounded\" x-show=\"isModeCreate\" <strong>@click=\"onSubmit\"<\/strong>&gt;\u767b\u9332\u3059\u308b&lt;\/button&gt;\r\n                &lt;button type=\"submit\" class=\"bg-blue-700 text-blue-50 p-2 rounded\" x-show=\"isModeEdit\" <strong>@click=\"onSubmit\"<\/strong>&gt;\u5909\u66f4\u3059\u308b&lt;\/button&gt;\r\n            &lt;\/div&gt;\r\n        &lt;\/div&gt;\r\n    &lt;\/div&gt;\r\n\r\n    <strong>&lt;!-- \u2465 \u3053\u3053\u306b defer \u304c\u306a\u3044\u3068\u3046\u307e\u304f\u3044\u304d\u307e\u305b\u3093 --&gt;<\/strong>\r\n    &lt;script <strong>defer<\/strong> src=\"https:\/\/unpkg.com\/alpinejs@3.8.1\/dist\/cdn.min.js\"&gt;&lt;\/script&gt;\r\n    &lt;script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/axios\/0.25.0\/axios.min.js\"&gt;&lt;\/script&gt;\r\n    &lt;script&gt;\r\n\r\n        const article = () =&gt; {\r\n\r\n            return {\r\n\r\n                \/\/ data\r\n                mode: 'create', \/\/ `create` or `edit`\r\n                params: {\r\n                    title: '',\r\n                    content: '',\r\n                },\r\n                articles: [],\r\n                page: 1,\r\n                resultMessage: '',\r\n                hasPrevPage: false,\r\n                hasNextPage: false,\r\n\r\n                \/\/ methods\r\n                getArticles() {\r\n\r\n                    this.articles = [];\r\n                    const url = '{{ route('article.list') }}?page=' + this.page;\r\n                    axios.get(url)\r\n                        .then(response =&gt; {\r\n\r\n                            this.articles = response.data.data;\r\n                            this.hasPrevPage = response.data.prev_page_url !== null;\r\n                            this.hasNextPage = response.data.next_page_url !== null;\r\n\r\n                        });\r\n\r\n                },\r\n                onEdit(article) {\r\n\r\n                    <strong>\/\/ \u2466 - 1 \u30b9\u30d7\u30ec\u30c3\u30c9\u69cb\u6587\u3092\u4f7f\u3046\u3068\u7701\u30b3\u30fc\u30c9\u306b\u306a\u308a\u307e\u3059<\/strong>\r\n                    this.params = <strong>{ ...article }<\/strong>; \/\/ \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u8907\u88fd\r\n                    this.mode = 'edit';\r\n\r\n                },\r\n                onMovePage(mode) {\r\n\r\n                    this.page += (mode === 'prev') ? -1 : 1;\r\n                    this.getArticles();\r\n\r\n                },\r\n                onSubmit() {\r\n\r\n                    if(confirm('\u9001\u4fe1\u3057\u307e\u3059\u3002\u3088\u308d\u3057\u3044\u3067\u3059\u304b\uff1f')) {\r\n\r\n                        let url = '';\r\n                        let additionalParams = {};\r\n\r\n                        if(this.isModeCreate === true) {\r\n\r\n                            url = '{{ route('article.store') }}';\r\n\r\n                        } else if(this.isModeEdit === true) {\r\n\r\n                            const articleId = this.params.id;\r\n                            url = `{{ route('article.update', '') }}\/${articleId}`;\r\n                            additionalParams = { _method: 'PUT' };\r\n\r\n                        }\r\n\r\n                        <strong>\/\/ \u2466 - 2 \u30b9\u30d7\u30ec\u30c3\u30c9\u69cb\u6587\u3092\u4f7f\u3046\u3068\u7701\u30b3\u30fc\u30c9\u306b\u306a\u308a\u307e\u3059<\/strong>\r\n                        const data = <strong>{ \/\/ \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u5408\u4f53<\/strong>\r\n<strong>                            ...this.params,<\/strong>\r\n<strong>                            ...additionalParams<\/strong>\r\n<strong>                        };<\/strong>\r\n\r\n                        axios.post(url, data)\r\n                            .then(response =&gt; {\r\n\r\n                                if(response.data.result === true) {\r\n\r\n                                    this.getArticles();\r\n\r\n                                    this.params = {\r\n                                        id: '',\r\n                                        title: '',\r\n                                        content: '',\r\n                                    };\r\n                                    this.resultMessage = '\u4fdd\u5b58\u304c\u5b8c\u4e86\u3057\u307e\u3057\u305f\uff01';\r\n\r\n                                    setTimeout(() =&gt; { \/\/ 3 \u79d2\u5f8c\u306b\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u30af\u30ea\u30a2\r\n\r\n                                        this.resultMessage = '';\r\n\r\n                                    }, 3000);\r\n\r\n                                }\r\n\r\n                            });\r\n\r\n                    }\r\n\r\n                },\r\n                onDelete(article) {\r\n\r\n                    if (confirm('\u524a\u9664\u3057\u307e\u3059\u3002\u3088\u308d\u3057\u3044\u3067\u3059\u304b\uff1f')) {\r\n\r\n                        const url = '{{ route('article.destroy', '') }}\/' + article.id;\r\n                        axios.delete(url)\r\n                            .then(response =&gt; {\r\n\r\n                                if (response.data.result === true) {\r\n\r\n                                    this.getArticles();\r\n\r\n                                }\r\n\r\n                            });\r\n\r\n                    }\r\n                },\r\n\r\n                \/\/ Computed\r\n                <strong>\/\/ \u2467 \u5b9f\u969b\u306f\u3061\u3087\u3063\u3068\u9055\u3044\u307e\u3059\u304c Computed \u306e\u4ee3\u308f\u308a\u306b\u3057\u3066\u307e\u3059<\/strong>\r\n                <strong>get isModeCreate() {<\/strong>\r\n\r\n<strong>                    return this.mode === 'create';<\/strong>\r\n\r\n<strong>                },<\/strong>\r\n<strong>                get isModeEdit() {<\/strong>\r\n\r\n<strong>                    return this.mode === 'edit';<\/strong>\r\n\r\n<strong>                }<\/strong>\r\n            };\r\n\r\n        };\r\n\r\n    &lt;\/script&gt;\r\n\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;<\/pre>\n<p>\u3067\u306f\u3001\u5c11\u3057\u30b3\u30fc\u30c9\u304c\u9577\u3044\u306e\u3067\u3072\u3068\u3064\u305a\u3064\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<h1><strong>\u2460 x-for \u3067\u30eb\u30fc\u30d7\u3057\u3066\u307e\u3059<\/strong><\/h1>\n<p><code>x-for<\/code>\u306f\u3001<code>Vue<\/code>\u3068\u540c\u3058\u3088\u3046\u306b\u30c7\u30fc\u30bf\u3092\u30eb\u30fc\u30d7\u3055\u305b\u308b\u8a18\u8ff0\u3067\u3059\u3002<br \/>\n\u305d\u306e\u305f\u3081\u3001\u30c6\u30fc\u30d6\u30eb\u3067\u30ea\u30b9\u30c8\u3092\u4f5c\u308b\u306e\u306b\u91cd\u5b9d\u3059\u308b\u3067\u3057\u3087\u3046\u3002<\/p>\n<p><strong>\u3010\u26a0 \u3054\u6ce8\u610f\u3011<\/strong><\/p>\n<p>\u306a\u304a\u3001\u3053\u308c\u306f<code>Alpine.js<\/code>\u306e\u30af\u30bb\u3068\u3044\u3046\u304b\u7279\u5fb4\u306a\u306e\u3067\u3059\u304c\u3001<strong><code>x-for<\/code>\u306f<code>&lt;template&gt;&lt;\/template&gt;<\/code>\u30bf\u30b0\u306e\u4e2d\u3060\u3051\u3067\u6709\u52b9\u3067\u3059\u3002<\/strong><\/p>\n<p>\u3064\u307e\u308a\u3001<code>&lt;div&gt;<\/code>\u3084<code>&lt;li&gt;<\/code>\u30bf\u30b0\u306b\u306f\u76f4\u63a5\u4f7f\u3046\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n<p>\u307e\u305f\u3001\u3053\u308c\u306f<code>x-if<\/code>\u3082\u3053\u308c\u3068\u540c\u3058\u3067\u3001\u4eca\u56de\u306e\u30b3\u30fc\u30c9\u3067\u4f7f\u3063\u3066\u3044\u306a\u3044\u306e\u306f\u3053\u308c\u304c\u539f\u56e0\u3067\u3059\u3002<\/p>\n<h1>\u2461 x-show \u306f\u3001\u76f4\u63a5\u30bf\u30b0\u306b\u30bb\u30c3\u30c8\u3057\u3066\u3082OK\u3067\u3059<\/h1>\n<p>\u5148\u307b\u3069\u3054\u7d39\u4ecb\u3057\u305f\u3088\u3046\u306b\u3001<code>x-if<\/code>\u306f<code>&lt;template&gt;&lt;\/template&gt;<\/code>\u30bf\u30b0\u306b\u30bb\u30c3\u30c8\u3057\u306a\u3051\u308c\u3070\u3044\u3051\u307e\u305b\u3093\u304c\u3001<code>x-show<\/code>\u306f\u76f4\u63a5<code>&lt;div&gt;<\/code>\u306a\u3069\u306e\u30bf\u30b0\u306b\u66f8\u304d\u8fbc\u3080\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u203b \u305d\u306e\u305f\u3081\u3001\uff08\u4f7f\u3044\u3069\u3053\u308d\u304c\u9055\u3046\u306e\u3067\u3059\u304c\uff09\u500b\u4eba\u7684\u306b\u306f<code>Vue<\/code>\u3067\u6163\u308c\u3066\u3044\u308b\u306e\u3067<code>x-show<\/code>\u306e\u65b9\u304c\u597d\u304d\u304b\u306a\u3001\u3068\u3044\u3046\u30ab\u30f3\u30b8\u3067\u3057\u305f\u3002<\/p>\n<h1>\u2462 x-text \u3067\u30c7\u30fc\u30bf\u3092\u8868\u793a\u3057\u307e\u3059<\/h1>\n<p>\u3053\u308c\u3082<code>Vue<\/code>\u3068\u540c\u3058\u3067\u3001\u30bf\u30b0\u306e\u4e2d\u8eab\u306e\u5024\u3092\u6307\u5b9a\u3059\u308b\u8a18\u8ff0\u3067\u3059\u3002<br \/>\n\u307e\u305f\u3001<code>x-html<\/code>\u3082\u5b58\u5728\u3057\u3066\u3044\u308b\u306e\u3067\u3001HTML\u30bf\u30b0\u3092\u6709\u52b9\u306b\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\ud83d\udc4d<\/p>\n<h1>\u2463 x-model \u3067\u53cc\u65b9\u5411\u30d0\u30a4\u30f3\u30c7\u30a3\u30f3\u30b0\u3057\u307e\u3059<\/h1>\n<p><code>v-model<\/code>\u3068\u540c\u69d8\u3067\u3001<code>&lt;input&gt;<\/code>\u30bf\u30b0\u306e\u4e2d\u8eab\u304c\u5909\u308f\u308c\u3070\u3001\u81ea\u52d5\u7684\u306b\u5909\u6570\u306e\u4e2d\u8eab\u3082\u5909\u66f4\u3057\u3001\u3055\u3089\u306b\u3001\u305d\u306e\u9006\u3082\u3084\u3063\u3066\u304f\u308c\u308b\u3068\u3044\u3046\u300c<strong>\u30ea\u30a2\u30af\u30c6\u30a3\u30d6<\/strong>\u300d\u306a\u6a5f\u80fd\u3067\u3059\u3002<\/p>\n<h1>\u2464 @***** \u3092\u4f7f\u3063\u3066\u30a4\u30d9\u30f3\u30c8\u3092\u30bb\u30c3\u30c8\u3067\u304d\u307e\u3059<\/h1>\n<p><code>@click=\"*****\"<\/code>\u3067\u30af\u30ea\u30c3\u30af\u30a4\u30d9\u30f3\u30c8\u3092\u30bb\u30c3\u30c8\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br \/>\n\u306a\u304a\u3001\u3053\u308c\u3082<code>Vue<\/code>\u3068\u540c\u69d8\u306b<code>x-on:click<\/code>\u3068\u3044\u3046\u66f8\u304d\u65b9\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<h1>\u2465 \u3053\u3053\u306b defer \u304c\u306a\u3044\u3068\u3046\u307e\u304f\u3044\u304d\u307e\u305b\u3093<\/h1>\n<p>\u3053\u308c\u3082\u7279\u5fb4\u306e\u3072\u3068\u3064\u3068\u8a00\u3063\u3066\u3044\u3044\u3068\u601d\u3046\u306e\u3067\u3059\u304c\u3001\u3069\u3046\u3084\u3089<code>Alpine.js<\/code>\u306f\u300c<strong>\u5148\u306b\u500b\u5225\u30b3\u30fc\u30c9\u3092\u7528\u610f\u3057\u3066\u304b\u3089\u672c\u4f53\u3092\u547c\u3073\u51fa\u3055\u306a\u3044\u3068\u30a8\u30e9\u30fc\u306b\u306a\u308b<\/strong>\u300d\u3088\u3046\u3067\u3059\u3002<\/p>\n<p>\u305d\u306e\u305f\u3081\u3001<code>defer<\/code>\u3092\u30bb\u30c3\u30c8\u3059\u308b\u3053\u3068\u3067\u6700\u5f8c\u306b<code>Alpine.js<\/code>\u672c\u4f53\u304c\u8aad\u307f\u8fbc\u307e\u308c\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h1>\u2466 \u30b9\u30d7\u30ec\u30c3\u30c9\u69cb\u6587\u3092\u4f7f\u3046\u3068\u7701\u30b3\u30fc\u30c9\u306b\u306a\u308a\u307e\u3059<\/h1>\n<p>\u306a\u304a\u3001\u3053\u308c\u306f<code>Alpine.js<\/code>\u306b\u306f\u76f4\u63a5\u95a2\u4fc2\u306f\u306a\u3044\u306e\u3067\u3059\u304c\u3001\u4fbf\u5229\u306a\u66f8\u304d\u65b9\u306a\u306e\u3067\u300c<strong>\u30b9\u30d7\u30ec\u30c3\u30c9\u69cb\u6587\uff08<code>Spread operator<\/code>\uff09<\/strong>\u300d\u3054\u7d39\u4ecb\u3055\u305b\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u3001\u79c1\u306f\u4ee5\u524d\u300c\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u8907\u88fd\u3059\u308b\u300d\u5834\u5408\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u66f8\u3044\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n<pre><strong>const clonedData = Object.assign({}, data);<\/strong><\/pre>\n<p>\u3057\u304b\u3057\u3001\u5b9f\u306f\u3082\u3063\u3068\u30b7\u30f3\u30d7\u30eb\u306b\u66f8\u304f\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre><strong>const clonedData = { ...data };<\/strong><\/pre>\n<p>\u3044\u304b\u304c\u3067\u3057\u3087\u3046\u3002<br \/>\n\u7701\u30b3\u30fc\u30c9\u3067\u898b\u3084\u3059\u304f\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u3061\u306a\u307f\u306b\u3001\u30b9\u30d7\u30ec\u30c3\u30c9\u69cb\u6587\u306f\u3001\u6b21\u306e\u3088\u3046\u306b\uff12\u3064\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u5408\u4f53\u3055\u305b\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre><strong>const mergedData = {<\/strong>\r\n    <strong>...data1<\/strong>, \/\/ \ud83d\udc48 \uff11\u3064\u76ee\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\r\n    <strong>...data2<\/strong>  \/\/ \ud83d\udc48 \uff12\u3064\u76ee\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\r\n<strong>};<\/strong><\/pre>\n<p>\u305c\u3072\u4fbf\u5229\u306a\u306e\u3067\u3084\u3063\u3066\u307f\u3066\u304f\u3060\u3055\u3044\ud83d\ude04<\/p>\n<h1>\u2467 \u5b9f\u969b\u306f\u3061\u3087\u3063\u3068\u9055\u3044\u307e\u3059\u304c Computed \u306e\u4ee3\u308f\u308a\u306b\u3057\u3066\u307e\u3059<\/h1>\n<p><code>Vue<\/code>\u306b\u306f\u3001\u5024\u3092\u4e00\u6642\u7684\u306b\u30ad\u30e3\u30c3\u30b7\u30e5\u3057\u3066\u304f\u308c\u308b\uff08\u3064\u307e\u308a\u3001\u540c\u3058\u51e6\u7406\u3092\u4f55\u56de\u3082\u5b9f\u884c\u3057\u306a\u3044\uff09\u6a5f\u80fd<code>Computed<\/code>\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u3069\u3046\u3084\u3089<code>Alpine.js<\/code>\u306b\u306f\u5b58\u5728\u3057\u306a\u3044\u3088\u3046\u3067\u3057\u305f\u306e\u3067\u3001\u3053\u306e\u3088\u3046\u306a\u5f62\u3067\u4ee3\u7528\u3057\u307e\u3057\u305f\u3002<\/p>\n<p><strong>\u3010\u8ffd\u8a18\uff1a2022.02.24\u3011<\/strong><br \/>\n<code>getter<\/code>\u3092\u4f7f\u3046\u65b9\u6cd5\u3078\u5909\u66f4\u3057\u307e\u3057\u305f\u3002<\/p>\n<p><code>getter<\/code>\u3092\u4f7f\u3046\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u901a\u5e38\u306e\u5909\u6570\u306e\u3088\u3046\u306b\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre>if(<strong>this.isModeCreate<\/strong> === true) { <strong>\/\/ \ud83d\udc48 getter \u306a\u306e\u3067 () \u306f\u3044\u3089\u306a\u3044<\/strong>\r\n\r\n    \r\n\r\n} else if(<strong>this.isModeEdit<\/strong> === true) { <strong>\/\/ \ud83d\udc48 getter \u306a\u306e\u3067 () \u306f\u3044\u3089\u306a\u3044<\/strong>\r\n\r\n    \r\n\r\n}<\/pre>\n<p>\u60c5\u5831\u3042\u308a\u304c\u3068\u3046\u3054\u3056\u3044\u307e\u3059\ud83d\ude04<\/p>\n<p>\u306a\u304a\u3001\u4ee5\u4e0b\u306f\u901a\u5e38\u306e\u95a2\u6570\u3068\u3057\u3066\u4f7f\u3046\u65b9\u6cd5\u3067\u3001\u6295\u7a3f\u5f53\u6642\u306e\u3082\u306e\u3067\u3059\u3002<\/p>\n<p>\u305d\u306e\u305f\u3081\u3001<code>Vue<\/code>\u3067\u306f\u5909\u6570\u306e\u3088\u3046\u306b\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u304c\u3001\u4eca\u56de\u306f\u30b3\u30fc\u30c9\u5185\u3067\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u901a\u5e38\u306e\u95a2\u6570\u306e\u3088\u3046\u306b\u3057\u3066\u4f7f\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre><strong>if(this.isModeCreate() === true) {<\/strong>\r\n\r\n<strong>    \/\/ \u7701\u7565<\/strong>\r\n\r\n<strong>} else if(this.isModeEdit() === true) {<\/strong>\r\n\r\n<strong>    \/\/ \u7701\u7565<\/strong>\r\n\r\n<strong>}<\/strong><\/pre>\n<p>\u203b \u305f\u3060\u3057\u3001<code>x-show<\/code>\u306e\u4e2d\u3067\u306f\u5909\u6570\u306e\u3088\u3046\u306b\u4f7f\u3048\u307e\u3059\u3002<\/p>\n<pre><strong>x-show=\"isModeCreate\"<\/strong><\/pre>\n<h1>\u30eb\u30fc\u30c8\u3092\u3064\u304f\u308b<\/h1>\n<p>\u3067\u306f\u3001\u6700\u5f8c\u306b\u30eb\u30fc\u30c8\u3067\u3059\u3002<\/p>\n<p><strong>routes\/web.php<\/strong><\/p>\n<pre><strong>use App\\Http\\Controllers\\ArticleController;<\/strong>\r\n\r\n\/\/ \u7701\u7565\r\n\r\n<strong>Route::prefix('article')-&gt;controller(ArticleController::class)-&gt;group(function() {<\/strong>\r\n\r\n<strong>    Route::get('\/', 'index')-&gt;name('article.index');<\/strong>\r\n<strong>    Route::get('\/list', 'list')-&gt;name('article.list');<\/strong>\r\n<strong>    Route::post('', 'store')-&gt;name('article.store');<\/strong>\r\n<strong>    Route::put('\/{article}', 'update')-&gt;name('article.update');<\/strong>\r\n<strong>    Route::delete('\/{article}', 'destroy')-&gt;name('article.destroy');<\/strong>\r\n\r\n<strong>});<\/strong><\/pre>\n<p>\u203b \u306a\u304a\u3001<code>Laravel 8.80<\/code>\u304b\u3089\u6709\u52b9\u306b\u306a\u3063\u305f<code>controller()<\/code>\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066\u3044\u307e\u3059\u3002\u7701\u30b3\u30fc\u30c9\u3001\u30d0\u30f3\u30b6\u30a4 \ud83c\udf89<\/p>\n<h1>\u30c6\u30b9\u30c8\u3057\u3066\u307f\u308b<\/h1>\n<p>\u3067\u306f\u3001\u30c6\u30b9\u30c8\u3092&#8230;\u3068\u601d\u3044\u307e\u3057\u305f\u304c\u524d\u56de\u3068\u5168\u304f\u540c\u3058\u6319\u52d5\u3067\u3059\u306e\u3067\u3001\u4eca\u56de\u306f\u5272\u611b\u3057\u307e\u3059\u3002\u3082\u3057<code>Svelte<\/code>\u7248\u3067\u3088\u308d\u3057\u3051\u308c\u3070\u3001\u4ee5\u4e0b\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><strong>\ud83d\udcdd \u53c2\u8003\u30da\u30fc\u30b8<\/strong>\uff1a\u00a0<a href=\"https:\/\/blog.capilano-fw.com\/?p=9987#i-8\" target=\"_blank\" rel=\"noopener\">\u30c6\u30b9\u30c8\u3057\u3066\u307f\u308b<\/a><\/p>\n<h1>\u4f01\u696d\u69d8\u3078\u306e\u3054\u63d0\u6848<\/h1>\n<p>\u4eca\u56de\u306e\u3088\u3046\u306b\u3001\u3082\u3057<code>Alpine.js<\/code>\u3092\u4f7f\u3063\u305f\u958b\u767a\u3055\u308c\u3066\u3044\u3089\u3063\u3057\u3083\u3063\u305f\u3089\u304a\u529b\u306b\u306a\u308c\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u305c\u3072\u3054\u5e0c\u671b\u3067\u3057\u305f\u3089\u3001\u304a\u554f\u3044\u5408\u308f\u305b\u304b\u3089\u3054\u9023\u7d61\u304f\u3060\u3055\u3044\u3002<br \/>\n\u304a\u5f85\u3061\u3057\u3066\u304a\u308a\u307e\u3059\u3002\ud83d\ude04\u2728<\/p>\n<h1><span id=\"i-10\">\u3061\u306a\u307f\u306b\uff1a \u4f7f\u3063\u3066\u307f\u305f\u611f\u60f3<\/span><\/h1>\n<p>\u4eca\u56de\u306f\u3058\u3081\u3066<code>Alpine.js<\/code>\u3092\u672c\u683c\u7684\u306b\u4f7f\u3063\u3066\u307f\u305f\u611f\u60f3\u3092\u307e\u3068\u3081\u3066\u307f\u307e\u3057\u305f\u3002\uff08\u521d\u898b\u306a\u306e\u3067\u9055\u3063\u3066\u3044\u305f\u3089\u3054\u6307\u6458\u304f\u3060\u3055\u3044\u3002m(_ _)m\uff09<\/p>\n<h2>\u3044\u3044\u306a\u3068\u601d\u3063\u305f\u90e8\u5206<\/h2>\n<ul>\n<li>Vue\u306b\u6163\u308c\u3066\u3044\u308c\u3070\u3001\u5b66\u7fd2\u30b3\u30b9\u30c8\u306f\u3068\u3066\u3082\u4f4e\u3044<\/li>\n<li>Vue 3 \u3067\u5931\u3063\u3066\u3057\u307e\u3063\u305f\uff08\u3068\u500b\u4eba\u7684\u306b\u601d\u3063\u3066\u308b\uff09\u30b7\u30f3\u30d7\u30eb\u3055\u304c\u6b8b\u3055\u308c\u3066\u3044\u308b<\/li>\n<li>\u30d3\u30eb\u30c9\u306a\u3057\u3067\u3082\u4f7f\u3048\u308b<\/li>\n<li>Blade \u5185\u306b\u66f8\u3051\u308b\u306e\u3067\u3001PHP\u306e\u5909\u6570\u3084\u5b9a\u6570\u3092\u57cb\u3081\u8fbc\u3080\u3053\u3068\u304c\u3067\u304d\u308b<\/li>\n<li>\uff08\u4f5c\u8005\u304c Livewire \u3082\u624b\u304c\u3051\u3066\u3044\u308b\u3068\u3044\u3046\u3053\u3068\u3067\uff09Laravel \u3068\u306e\u76f8\u6027\u304c\u3044\u3044<\/li>\n<\/ul>\n<h2><span id=\"i-12\">\u6c17\u306b\u306a\u3063\u305f\u3068\u3053\u308d<\/span><\/h2>\n<ul>\n<li>x-for \u3084 x-if \u3092\u4f7f\u3046\u5834\u5408\u3001&lt;template&gt;&lt;\/template&gt; \u30bf\u30b0\u3092\u66f8\u304b\u306a\u3044\u3068\u3044\u3051\u306a\u3044<\/li>\n<li>Vue \u306b\u3042\u308b computed \u304c\u306a\u3044<\/li>\n<li>\uff08<strong>shirocake<\/strong> \u3055\u3093\u3082\u3054\u6307\u6458\u306b\u306a\u3089\u308c\u3066\u3044\u307e\u3057\u305f\u304c\uff09\u77e5\u540d\u5ea6\u304c\u307e\u3060\u3042\u307e\u308a\u306a\u3044\uff08\u305f\u3060\u3057\u3001GitHub \u3067\u306e\u30b9\u30bf\u30fc\u306f 2\u4e07\u8fd1\u304f\u3042\u308a\u307e\u3059\u30022022.02.02 \u73fe\u5728\uff09<\/li>\n<\/ul>\n<h1>\u304a\u308f\u308a\u306b<\/h1>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u4eca\u56de\u306f<code>Laravel + Alpine.js<\/code>\u3067<code>CRUD<\/code>\u6a5f\u80fd\u3092\u3064\u304f\u3063\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u4eca\u56de\u3082\u4e16\u754c\u306e\u5929\u624d\u304c\u3064\u304f\u3063\u305f\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3092\u4f53\u9a13\u3059\u308b\u3053\u3068\u3067\u3001\u3044\u308d\u3044\u308d\u3068\u52c9\u5f37\u306b\u306a\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3057\u305f\u3002\u3044\u3064\u3082\u611f\u8b1d\u3067\u3059\u3002m(_ _)m<\/p>\n<p>\u3061\u306a\u307f\u306b\u3001\u3053\u3046\u3044\u3046\u30c6\u30af\u30ce\u30ed\u30b8\u30fc\u3092\u81ea\u5206\u3067\u3064\u304f\u308a\u3042\u3052\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u5929\u624d\u305f\u3061\u306f\u3084\u3063\u3071\u308a\u30b9\u30b4\u30a4\u3067\u3059\u3088\u306d\u3002<\/p>\n<p>\u3082\u3057\u4f5c\u54c1\u304c\u4eba\u6c17\u306b\u306a\u3063\u3066\u3082\u305a\u3063\u3068\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u304c\u5fc5\u8981\u3067\u3059\u3057\u3001\u4e16\u754c\u4e2d\u306e\u4eba\u304c\u4f7f\u3044\u51fa\u3059\u3068\u3001\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u306e\u969b\u306b\u3044\u308d\u3093\u306a\u610f\u898b\u304c\u51fa\u3066\u304f\u308b\u3057\u2026\u3067\u3001\u306a\u304b\u306a\u304b\u5927\u5909\u306a\u3093\u3058\u3083\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<p><code>faker.js<\/code>\uff06<code>color.js<\/code>\u306e\u8a71\u3058\u3083\u306a\u3044\u3067\u3059\u304c\u3001\u3053\u3046\u3044\u3063\u305f\u65b9\u3005\u306f\u91d1\u92ad\u7684\u306b\u3082\u88d5\u798f\u306b\u306a\u3063\u3066\u307b\u3057\u3044\u3082\u306e\u3067\u3059\u3002\uff08\u8ca7\u8005\u306e\u4e00\u706f\u3068\u3044\u3046\u3084\u3064\u3067\u3059\u304c\u3001\u79c1\u306f\u5c11\u3057\u524d\u306b<code>Canonical<\/code>\uff08<code>Ubuntu<\/code>\uff09\u306b\u5bc4\u4ed8\u3057\u307e\u3057\u305f\uff09<\/p>\n<p>\u305c\u3072\u7686\u3055\u3093\u3082<code>Alpine.js<\/code>\u3092\u8a66\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u306d\u3002<\/p>\n<p>\u3067\u306f\u3067\u306f\u301c\u2757<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9470 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/08\/no_13.png\" alt=\"\" width=\"294\" height=\"320\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/08\/no_13.png 294w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/08\/no_13-276x300.png 276w\" sizes=\"auto, (max-width: 294px) 100vw, 294px\" \/>\u300c\u5375 + \u7c89\u30c1\u30fc\u30ba<br \/>\n\u2192 \u6df7\u305c\u3066\u96fb\u5b50\u30ec\u30f3\u30b8<br \/>\n\uff1d \u30d5\u30ef\u30d5\u30ef\u5375\u713c\u304d\u3067\u304d\u307e\u3059\ud83d\udc4d\u300d<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u5c11\u3057\u524d\u306b\u516c\u958b\u3057\u305f\u00a0Laravel \u3067 Svelte \u3092\u4f7f\u3046 \u301c \u3088\u308a\u30b7\u30f3\u30d7\u30eb\u3092\u6c42\u3081\u3066\uff12 \u301c\u00a0\u3068\u3044\u3046\u8a18\u4e8b\u3067\u306f\u3001\u6700\u8fd1\u3088\u304f\u898b\u304b\u3051\u308b\u3088\u3046\u306b\u306a\u3063\u305fSvelte\u3092 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.capilano-fw.com\/?p=10057\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;Laravel \u3067 Alpine.js \u3092\u4f7f\u3046 \u301c \u3088\u308a\u30b7\u30f3\u30d7\u30eb\u3092\u6c42\u3081\u3066\uff13 \u301c&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":10061,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-10057","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-laravel"],"_links":{"self":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/10057","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=10057"}],"version-history":[{"count":10,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/10057\/revisions"}],"predecessor-version":[{"id":10063,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/10057\/revisions\/10063"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/media\/10061"}],"wp:attachment":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10057"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10057"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10057"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}