{"id":8449,"date":"2021-01-04T07:00:41","date_gmt":"2021-01-03T22:00:41","guid":{"rendered":"https:\/\/blog.capilano-fw.com\/?p=8449"},"modified":"2021-01-14T22:01:45","modified_gmt":"2021-01-14T13:01:45","slug":"%e3%80%90laravel%e3%80%91%e3%82%b7%e3%83%b3%e3%83%97%e3%83%ab%e3%81%abcms%e3%82%92%e5%ae%9f%e8%a3%85%e3%81%99%e3%82%8b%ef%bc%88ckeditor-5%ef%bc%89","status":"publish","type":"post","link":"https:\/\/blog.capilano-fw.com\/?p=8449","title":{"rendered":"\u3010Laravel\u3011\u30b7\u30f3\u30d7\u30eb\u306bCMS\u3092\u5b9f\u88c5\u3059\u308b\uff08CKEditor 5\uff09"},"content":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u300c<strong>PHP\u3067\u30b5\u30a4\u30c8\u3092\u3064\u304f\u308b<\/strong>\u300d\u3068\u3044\u3048\u3070\u3001\u8fd1\u5e74\u3067\u306f<code>Laravel<\/code>\u3001\u305d\u3057\u3066<code>wordpress<\/code>\u304c\u30e1\u30a4\u30f3\u306e\u9078\u629e\u80a2\u306b\u306a\u308b\u306e\u3067\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<p>\uff082020.12.26\u73fe\u5728\u3067\u306f\uff09\u306a\u3093\u3068\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u306e<strong>39%<\/strong>\u304c<code>wordpress<\/code>\u3067\u69cb\u7bc9\u3055\u308c\u3066\u3044\u308b\u3068\u3044\u3046\u3053\u3068\u3067<code>PHP\u696d\u754c<\/code>\u3060\u3051\u3067\u306a\u304f\u5927\u304d\u306a\u5f71\u97ff\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001\u305d\u3093\u306a\u4eba\u6c17\u304b\u3089\u305f\u307e\u306b\u76f4\u9762\u3059\u308b\u8ab2\u984c\u304c\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p><strong style=\"font-size: 35px;\">Laravel\u3067wordpress\u307f\u305f\u3044\u306a\u300cCMS\u300d\u304c\u4f7f\u3044\u305f\u3044<\/strong><\/p>\n<p>\u3068\u3044\u3046\u3082\u306e\u3067\u3059\u3002\uff08CMS = \u30b3\u30f3\u30c6\u30f3\u30c4\u30fb\u30de\u30cd\u30b8\u30e1\u30f3\u30c8\u30fb<wbr \/>\u30b7\u30b9\u30c6\u30e0\uff09<\/p>\n<p>\u4ee5\u524d\u3053\u306e\u30d6\u30ed\u30b0\u3067\u3001<a href=\"https:\/\/blog.capilano-fw.com\/?p=2889\">\u30ed\u30b0\u30a4\u30f3\u4e2d\u306eLaravel\u30e6\u30fc\u30b6\u30fc\u3067wordpress\u3078\u81ea\u52d5\u30ed\u30b0\u30a4\u30f3\u3059\u308b<\/a>\u3068\u3044\u3046\u8a18\u4e8b\u3092\u516c\u958b\u3057\u307e\u3057\u305f\u304c\u3001\u300c<strong>\u6b63\u76f4\u8a00\u3046\u3068wordpress\u307b\u3069\u9ad8\u6a5f\u80fd\u3067\u306a\u304f\u3066\u3082\u3088\u304f\u3066\u3001\u30b7\u30f3\u30d7\u30eb\u306b\u3044\u304d\u305f\u3044\uff01<\/strong>\u300d\u3068\u3044\u3046\u5834\u9762\u3082\u3042\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n<p>\u305d\u3053\u3067\u2757<\/p>\n<p>\u4eca\u56de\u306f\u3001<code>Laravel<\/code>\u306b\u300c<strong>\u30b7\u30f3\u30d7\u30eb\u306aCMS<\/strong>\u300d\u3092\u3064\u304f\u308b\u65b9\u6cd5\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002<br \/>\n\u5229\u7528\u3059\u308b\u306e\u306f\u3001<code>CKEditor 5<\/code>\u3067\u3059\u3002<\/p>\n<p><code>CKEditor<\/code>\u306f\u3001\u7c21\u5358\u306b\u3044\u3046\u3068\u300c<strong>\u753b\u50cf\u3084HTML\u30bf\u30b0\u304c\u4f7f\u3048\u308b\u5165\u529b\u30dc\u30c3\u30af\u30b9<\/strong>\u300d\u3067\u3001\u3044\u308f\u3086\u308b\u300c<strong>\u30ea\u30c3\u30c1\u30fb\u30c6\u30ad\u30b9\u30c8\u30a8\u30c7\u30a3\u30bf<\/strong>\u300d\u3068\u304b\u300c<strong>wysiwyg\uff08\u3046\u3043\u3058\u3046\u3043\u3050\uff09\u30a8\u30c7\u30a3\u30bf<\/strong>\u300d\u3068\u547c\u3070\u308c\u308b\u3082\u306e\u3067\u3059\u3002<\/p>\n<p>\u305c\u3072\u7686\u3055\u3093\u306e\u304a\u5f79\u306b\u305f\u3066\u308b\u3068\u5b09\u3057\u3044\u3067\u3059\ud83d\ude0a\u2728<br \/>\n\uff08\u6700\u5f8c\u306b\u3001\u4eca\u56de\u5b9f\u969b\u306b\u958b\u767a\u3057\u305f\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u4e00\u5f0f\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u307e\u3059\u3088\ud83d\udc4d\uff09<\/p>\n<p><strong>\u3010\u8ffd\u8a18\uff1a2021.01.14\u3011<\/strong>\u30b3\u30fc\u30c9\u304c\u53e4\u3044\u307e\u307e\u6b8b\u3063\u3066\u3044\u308b\u90e8\u5206\u304c\u3042\u308a\u307e\u3057\u305f\u306e\u3067\u4fee\u6b63\u3057\u307e\u3057\u305f\u3002\u3054\u4e0d\u4fbf\u3092\u304a\u304b\u3051\u3057\u3066\u3059\u307f\u307e\u305b\u3093\u3002m(_ _)m<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2173 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/11\/no_24.png\" alt=\"\" width=\"300\" height=\"320\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/11\/no_24.png 300w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/11\/no_24-281x300.png 281w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/>\u300c\u7740\u308b\u30b3\u30bf\u30c4\u304c\u30ea\u30b3\u30fc\u30eb\u56de\u53ce\u3055\u308c\u308b\u3053\u3068\u306b\u3002<br \/>\n\u6c17\u306b\u5165\u3063\u3066\u305f\u306e\u306b\u30fb\u30fb\u30fb\ud83d\ude2b\u300d<\/p>\n<p><strong>\u958b\u767a\u74b0\u5883\uff1a<\/strong> Laravel 8.x\u3001Vue 3\u3001axios 0.19\u3001CKEditor 5<\/p>\n<p><span style=\"font-size: 1.5rem;\">\u30eb\u30fc\u30c8\u3092\u3064\u304f\u308b<\/span><\/p>\n<p>\u307e\u305a\u306f\u30eb\u30fc\u30c8\u3092\u3064\u304f\u308a\u307e\u3059\u3002<br \/>\n\u4ee5\u4e0b\u306e\u5185\u5bb9\u3092\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><strong>routes\/web.php<\/strong><\/p>\n<pre><strong>Route::prefix('post')-&gt;group(function(){<\/strong>\r\n\r\n<strong>    Route::get('\/', [PostController::class, 'index']);<\/strong>\r\n<strong>    Route::get('\/list', [PostController::class, 'list']);<\/strong>\r\n<strong>    Route::get('\/{post}', [PostController::class, 'show']);<\/strong>\r\n<strong>    Route::post('\/', [PostController::class, 'store']);<\/strong>\r\n    <strong>Route::put('\/{post}', [PostController::class, 'update']);<\/strong>\r\n<strong>    Route::delete('\/{post}', [PostController::class, 'destroy']);<\/strong>\r\n\r\n<strong>});<\/strong><\/pre>\n<p>\u26a0 \u306a\u304a\u3001\u4eca\u56de\u306f\u30c6\u30b9\u30c8\u306e\u305f\u3081\u7701\u7565\u3057\u3066\u3044\u307e\u3059\u304c\u3001\uff12\u3064\u76ee\u306e\u30eb\u30fc\u30c8<code>show()<\/code>\u4ee5\u5916\u306f<strong>\u7ba1\u7406\u8005\u30ed\u30b0\u30a4\u30f3\u305b\u305a\u306b\u8868\u793a\u3055\u308c\u308b\u3079\u304d\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/strong>\u4ee5\u4e0b\u3092\u53c2\u8003\u306b\u3057\u3066<code>auth<\/code>\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u306a\u3069\u3092\u3064\u3051\u3066\u5bfe\u5fdc\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\ud83d\udcdd\u00a0<a href=\"https:\/\/blog.capilano-fw.com\/?p=3987\">\u3010Laravel 5.8 \u3011\u300c\u3053\u3093\u306a\u3068\u304d\u300d\u306e\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u5168\uff17\u5b9f\u4f8b<\/a><\/p>\n<h1>\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3092\u3064\u304f\u308b<\/h1>\n<p>\u7d9a\u3044\u3066\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3067\u3059\u3002<br \/>\n<span style=\"font-size: 1rem;\">\u307e\u305a\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/span><\/p>\n<pre><strong>php artisan make:controller PostController<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u3001\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u308b\u306e\u3067\u3001\u4e2d\u8eab\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><strong>app\/Http\/Controllers\/PostController.php<\/strong><\/p>\n<pre>&lt;?php\r\n\r\nnamespace App\\Http\\Controllers;\r\n\r\nuse App\\Models\\Post;\r\nuse Illuminate\\Http\\Request;\r\nuse Illuminate\\Support\\Str;\r\n\r\nclass PostController extends Controller\r\n{\r\n    <strong>public function index() {<\/strong>\r\n\r\n<strong>        return view('post.index');<\/strong>\r\n\r\n<strong>    }<\/strong>\r\n\r\n<strong>    public function list() {<\/strong>\r\n\r\n<strong>        return Post::get();<\/strong>\r\n\r\n<strong>    }<\/strong>\r\n\r\n<strong>    public function show(Post $post) {<\/strong>\r\n\r\n<strong>        return view('post.show')-&gt;with([<\/strong>\r\n<strong>            'post' =&gt; $post<\/strong>\r\n<strong>        ]);<\/strong>\r\n\r\n<strong>    }<\/strong>\r\n\r\n<strong>    public function store(Request $request) {<\/strong>\r\n\r\n<strong>        \/\/ \u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u306f\u7701\u7565\u3057\u3066\u307e\u3059<\/strong>\r\n\r\n<strong>        $post = new Post();<\/strong>\r\n<strong>        $post-&gt;title = $request-&gt;title;<\/strong>\r\n<strong>        $post-&gt;description = $request-&gt;description;<\/strong>\r\n<strong>        $result = $post-&gt;save();<\/strong>\r\n\r\n<strong>        return ['result' =&gt; $result];<\/strong>\r\n\r\n<strong>    }<\/strong>\r\n\r\n<strong>    public function update(Request $request, Post $post) {<\/strong>\r\n\r\n<strong>        \/\/ \u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u306f\u7701\u7565\u3057\u3066\u307e\u3059<\/strong>\r\n\r\n<strong>        $post-&gt;title = $request-&gt;title;<\/strong>\r\n<strong>        $post-&gt;description = $request-&gt;description;<\/strong>\r\n<strong>        $result = $post-&gt;save();<\/strong>\r\n\r\n<strong>        return ['result' =&gt; $result];<\/strong>\r\n\r\n<strong>    }<\/strong>\r\n\r\n<strong>    public function destroy(Post $post) {<\/strong>\r\n\r\n<strong>        return [<\/strong>\r\n<strong>            'result' =&gt; $post-&gt;delete()<\/strong>\r\n<strong>        ];<\/strong>\r\n\r\n<strong>    }<\/strong>\r\n}<\/pre>\n<p>\u4eca\u56de\u3001\u3053\u306e\u4e2d\u306e<code>index()<\/code>\u3068<code>show()<\/code>\u304c\u76f4\u63a5\u30d6\u30e9\u30a6\u30b6\u3067\u30a2\u30af\u30bb\u30b9\u3055\u308c\u308b\u30e1\u30bd\u30c3\u30c9\u3067\u3001\u305d\u308c\u4ee5\u5916\u306f\u5168\u3066<code>Ajax<\/code>\u3067\u306e\u30a2\u30af\u30bb\u30b9\u3092\u60f3\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h1>\u30e2\u30c7\u30eb\uff06\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u3092\u3064\u304f\u308b<\/h1>\n<p>\u6b21\u306b\u3001\u30e2\u30c7\u30eb\u3068\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u3092\u3064\u304f\u308a\u307e\u3059\u3002<br \/>\n\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><strong>php artisan make:model Post -m<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u3001\u30e2\u30c7\u30eb\u3068\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u306e\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u308b\u306e\u3067\u3001\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u306e\u4e2d\u8eab\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n<p><strong>database\/migrations\/****_**_**_******_create_posts_table.php<\/strong><\/p>\n<pre>\/\/ \u7701\u7565\r\n\r\npublic function up()\r\n{\r\n    Schema::create('posts', function (Blueprint $table) {\r\n        <strong>$table-&gt;id();<\/strong>\r\n<strong>        $table-&gt;string('title')-&gt;comment('\u30bf\u30a4\u30c8\u30eb');<\/strong>\r\n<strong>        $table-&gt;text('description')-&gt;comment('\u5185\u5bb9');<\/strong>\r\n<strong>        $table-&gt;timestamps();<\/strong>\r\n    });\r\n}\r\n\r\n\/\/ \u7701\u7565<\/pre>\n<p>\u306a\u304a\u3001\u8a18\u4e8b\u306e\u300c<strong>\u8868\u793a or \u975e\u8868\u793a<\/strong>\u300d\u6a5f\u80fd\u3092\u3064\u3051\u305f\u3044\u5834\u5408\u306f\u3001<code>wordpress<\/code>\u306e\u3088\u3046\u306b<code>status<\/code>\u306e\u3088\u3046\u306a\u9805\u76ee\u3092\u8ffd\u52a0\u3057\u3066\u304a\u304f\u3068\u3044\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<h1>\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf\u3092\u3064\u304f\u308b<\/h1>\n<p>\u3067\u306f\u3001\u4f5c\u696d\u304c\u3057\u3084\u3059\u3044\u3088\u3046\u306b\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf\u3092\u3064\u304f\u308a\u307e\u3059\u3002<br \/>\n\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><strong>php artisan make:seed PostsTableSeeder<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u3001\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u308b\u306e\u3067\u4e2d\u8eab\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre>&lt;?php\r\n\r\nnamespace Database\\Seeders;\r\n\r\n<strong>use App\\Models\\Post;<\/strong>\r\nuse Illuminate\\Database\\Seeder;\r\n\r\nclass PostsTableSeeder extends Seeder\r\n{\r\n    \/\/ \u7701\u7565\r\n\r\n    <strong>public function run()<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        for($i = 0; $i &lt; 25 ; $i++) {<\/strong>\r\n\r\n<strong>            $post = new Post();<\/strong>\r\n<strong>            $post-&gt;title = '\u30c6\u30b9\u30c8\u30bf\u30a4\u30c8\u30eb - '. $i;<\/strong>\r\n<strong>            $post-&gt;description = \"\u30c6\u30b9\u30c8\u5185\u5bb9\\n\u30c6\u30b9\u30c8\u5185\u5bb9\\n\u30c6\u30b9\u30c8\u5185\u5bb9\\n\u30c6\u30b9\u30c8\u5185\u5bb9 - \". $i;<\/strong>\r\n<strong>            $post-&gt;save();<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n<strong>    }<\/strong>\r\n}<\/pre>\n<p>\u7d9a\u3044\u3066\u3001\u3053\u306e\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf\u304c\u6709\u52b9\u306b\u306a\u308b\u3088\u3046\u306b\u3001<code>Laravel<\/code>\u5074\u3078\u767b\u9332\u3057\u307e\u3059\u3002<\/p>\n<p><strong>database\/seeders\/DatabaseSeeder.php<\/strong><\/p>\n<pre>&lt;?php\r\n\r\nnamespace Database\\Seeders;\r\n\r\nuse Illuminate\\Database\\Seeder;\r\n\r\nclass DatabaseSeeder extends Seeder\r\n{\r\n    \/**\r\n     * Seed the application's database.\r\n     *\r\n     * @return void\r\n     *\/\r\n    public function run()\r\n    {\r\n\/\/         User::factory(10)-&gt;create();\r\n        <strong>$this-&gt;call(PostsTableSeeder::class); <\/strong>\/\/ \ud83d\udc48 \u3053\u3053\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f\r\n    }\r\n}<\/pre>\n<p>\u3067\u306f\u3001\u3053\u306e\u72b6\u614b\u3067\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<br \/>\n\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><strong>php artisan migrate:fresh --seed<\/strong><\/pre>\n<p>\u5b9f\u884c\u304c\u5b8c\u4e86\u3059\u308b\u3068\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8450\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/12\/laravel_cms_1.png\" alt=\"\" width=\"640\" height=\"488\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/12\/laravel_cms_1.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/12\/laravel_cms_1-300x229.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<h1>\u30d3\u30e5\u30fc\u3092\u3064\u304f\u308b<\/h1>\n<p>\u3067\u306f\u3001\u30d6\u30e9\u30a6\u30b6\u3067\u5b9f\u969b\u306b\u8868\u793a\u3055\u308c\u308b\u300c<strong>\u30d3\u30e5\u30fc<\/strong>\u300d\u3092\u4f5c\u3063\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<br \/>\n\u4eca\u56de\u306f\u4ee5\u4e0b\u306e\uff12\u3064\u3092\u7528\u610f\u3057\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u8a18\u4e8b\u3092\u7ba1\u7406\u3059\u308b\u30da\u30fc\u30b8<\/li>\n<li>\u6295\u7a3f\u3057\u305f\u500b\u5225\u8a18\u4e8b\u3092\u8868\u793a\u3059\u308b\u30da\u30fc\u30b8<\/li>\n<\/ul>\n<p>\u307e\u305a\u306f\u3001\u8a18\u4e8b\u3092\u7ba1\u7406\u3059\u308b\u30da\u30fc\u30b8\u3067\u3059\u3002<\/p>\n<p><strong>resources\/views\/post\/index.blade.php<\/strong><\/p>\n<pre>&lt;html&gt;\r\n&lt;head&gt;\r\n    &lt;link rel=\"stylesheet\" href=\"https:\/\/stackpath.bootstrapcdn.com\/bootstrap\/4.5.0\/css\/bootstrap.min.css\"&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;div id=\"app\" class=\"container p-3\"&gt;\r\n    &lt;h1 class=\"mb-4\"&gt;\u30b7\u30f3\u30d7\u30eb\u306aCMS\u306e\u30b5\u30f3\u30d7\u30eb&lt;\/h1&gt;\r\n\r\n    &lt;!-- \u4e00\u89a7\u8868\u793a\u90e8\u5206 --&gt;\r\n    <strong>&lt;div v-if=\"isStatusIndex\"&gt;\r\n        &lt;div class=\"text-right pb-4\"&gt;\r\n            &lt;button type=\"button\" class=\"btn btn-success\" @click=\"changeStatus('create')\"&gt;\u8ffd\u52a0&lt;\/button&gt;\r\n        &lt;\/div&gt;\r\n        &lt;table class=\"table\"&gt;\r\n            &lt;tr v-for=\"post in posts\"&gt;\r\n                &lt;td v-text=\"post.title\"&gt;&lt;\/td&gt;\r\n                &lt;td class=\"text-right\"&gt;\r\n                    &lt;a :href=\"'\/post\/'+ post.id\" class=\"btn btn-light mr-2\" target=\"_blank\"&gt;\u78ba\u8a8d&lt;\/a&gt;\r\n                    &lt;button type=\"button\" class=\"btn btn-warning mr-2\" @click=\"setCurrentPost(post)\"&gt;\u5909\u66f4&lt;\/button&gt;\r\n                    &lt;button type=\"button\" class=\"btn btn-danger\" @click=\"onDelete(post)\"&gt;\u524a\u9664&lt;\/button&gt;\r\n                &lt;\/td&gt;\r\n            &lt;\/tr&gt;\r\n        &lt;\/table&gt;\r\n    &lt;\/div&gt;<\/strong>\r\n\r\n    &lt;!--  \u30a8\u30c7\u30a3\u30bf\u8868\u793a\u90e8\u5206  --&gt;\r\n    <strong>&lt;div v-if=\"isStatusCreate || isStatusEdit\"&gt;\r\n\r\n        &lt;input class=\"form-control mb-3\" type=\"text\" placeholder=\"\u30bf\u30a4\u30c8\u30eb\" v-model=\"postTitle\"&gt;\r\n\r\n        &lt;!-- \u3053\u3053\u306b\u30ea\u30c3\u30c1\u30c6\u30ad\u30b9\u30c8\u30fb\u30a8\u30c7\u30a3\u30bf\u304c\u8868\u793a\u3055\u308c\u307e\u3059 --&gt;\r\n        &lt;div id=\"editor\"&gt;&lt;\/div&gt;\r\n\r\n        &lt;div class=\"text-right pt-4\"&gt;\r\n            &lt;button type=\"button\" class=\"btn btn-secondary mr-2\" @click=\"changeStatus('index')\"&gt;\u30ad\u30e3\u30f3\u30bb\u30eb&lt;\/button&gt;\r\n            &lt;button type=\"button\" class=\"btn btn-primary\" @click=\"onSave\"&gt;\u4fdd\u5b58\u3059\u308b&lt;\/button&gt;\r\n        &lt;\/div&gt;\r\n    &lt;\/div&gt;<\/strong>\r\n\r\n&lt;\/div&gt;\r\n&lt;script src=\"https:\/\/unpkg.com\/vue@3.0.2\/dist\/vue.global.prod.js\"&gt;&lt;\/script&gt;\r\n&lt;script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/axios\/0.19.2\/axios.min.js\"&gt;&lt;\/script&gt;\r\n&lt;script src=\"https:\/\/cdn.ckeditor.com\/ckeditor5\/24.0.0\/classic\/ckeditor.js\"&gt;&lt;\/script&gt;\r\n&lt;script&gt;\r\n\r\n    Vue.createApp({\r\n        data() {\r\n            return {\r\n                <strong>status: 'index', \/\/ \ud83d\udc48 \u3053\u3053\u306e\u5185\u5bb9\u3067\u8868\u793a\u5207\u308a\u66ff\u3048<\/strong>\r\n                posts: [],\r\n                currentPost: {},\r\n                postTitle: '',  \/\/ \u30bf\u30a4\u30c8\u30eb\r\n                richEditor: null    \/\/ CKEditor\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\r\n            }\r\n        },\r\n        methods: {\r\n            initRichEditor(defaultDescription) {\r\n\r\n<strong>                const target = document.querySelector('#editor');\r\n                ClassicEditor.create(target)\r\n                    .then(editor =&gt; {\r\n\r\n                        this.postTitle = this.currentPost.title || '';\r\n                        this.richEditor = editor;\r\n                        this.richEditor.setData(defaultDescription);\r\n\r\n                    });<\/strong>\r\n\r\n            },\r\n            getPosts() {\r\n\r\n                const url = '\/post\/list';\r\n                axios.get(url)\r\n                    .then(response =&gt; {\r\n\r\n                        this.posts = response.data;\r\n\r\n                    });\r\n\r\n            },\r\n            setCurrentPost(post) {\r\n\r\n                this.currentPost = post;\r\n                this.status = 'edit';\r\n\r\n            },\r\n            changeStatus(status) {\r\n\r\n                this.status = status;\r\n\r\n            },\r\n            onSave() {\r\n\r\n                if(confirm('\u4fdd\u5b58\u3057\u307e\u3059\u3002\u3088\u308d\u3057\u3044\u3067\u3059\u304b\uff1f')) {\r\n\r\n                    let url = '';\r\n                    let method = '';\r\n\r\n                    if(this.isStatusCreate) {\r\n\r\n                        url = '\/post';\r\n                        method = 'POST';\r\n\r\n                    } else if(this.isStatusEdit) {\r\n\r\n                        url = `\/post\/${this.currentPost.id}`;\r\n                        method = 'PUT';\r\n\r\n                    }\r\n\r\n                    const params = {\r\n                        _method: method,\r\n                        title: this.postTitle,\r\n                        description: this.richEditor.getData()\r\n                    };\r\n                    axios.post(url, params)\r\n                        .then(response =&gt; {\r\n\r\n                            if(response.data.result === true) {\r\n\r\n                                this.getPosts();\r\n                                this.changeStatus('index');\r\n\r\n                            }\r\n\r\n                        })\r\n                        .catch(error =&gt; {\r\n\r\n                            console.log(error); \/\/ \u30a8\u30e9\u30fc\u306e\u5834\u5408\r\n\r\n                        });\r\n\r\n                }\r\n\r\n            },\r\n            onDelete(post) {\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 = `\/post\/${post.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.getPosts();\r\n\r\n                            }\r\n\r\n                        });\r\n\r\n                }\r\n\r\n            }\r\n        },\r\n        computed: {\r\n            isStatusIndex() {\r\n\r\n                return (this.status === 'index');\r\n\r\n            },\r\n            isStatusCreate() {\r\n\r\n                return (this.status === 'create');\r\n\r\n            },\r\n            isStatusEdit() {\r\n\r\n                return (this.status === 'edit');\r\n\r\n            }\r\n        },\r\n        <strong>watch: {\r\n            status(value) {\r\n\r\n                if(value === 'create') {\r\n\r\n                    this.currentPost = {};\r\n\r\n                }\r\n\r\n                const editorKeys = ['create', 'edit'];\r\n                const defaultDescription = (value === 'edit') ? this.currentPost.description : '';\r\n\r\n                if(editorKeys.includes(value)) { \/\/ \ud83d\udc48 `create` \u304b `edit` \u306e\u5834\u5408\u3060\u3051 CKEditor \u3092\u8d77\u52d5\r\n\r\n                    Vue.nextTick(() =&gt; {\r\n\r\n                        this.initRichEditor(defaultDescription);\r\n\r\n                    });\r\n\r\n                }\r\n\r\n            }\r\n        },<\/strong>\r\n        setup() {\r\n\r\n            return {\r\n                <strong>richEditor: Vue.reactive({})<\/strong> \/\/ \ud83d\udc48 reactive\u5909\u6570\u3092\u3064\u304f\u308b\r\n            }\r\n\r\n        },\r\n        mounted() {\r\n\r\n            this.getPosts();\r\n\r\n        }\r\n    }).mount('#app');\r\n\r\n&lt;\/script&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;<\/pre>\n<p>\u3053\u306e\u4e2d\u3067\u91cd\u8981\u306a\u306e\u304c\u3001<code>CKEditor<\/code>\u3092\u8d77\u52d5\u3057\u3066\u3044\u308b\u90e8\u5206\u3067\u3059\u3002<\/p>\n<p><code>CKEditor<\/code>\u3092\u8d77\u52d5\u3057\u305f\u3089\u4ee5\u4e0b\u306e\u3088\u3046\u306b<code>Vue<\/code>\u306e\u5909\u6570\u306b\u683c\u7d0d\u3057\u3066\u3044\u307e\u3059\u304c\u3001<strong>\u3053\u308c\u306f\u901a\u5e38\u306e\u5909\u6570\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/strong><\/p>\n<pre><strong>this.richEditor = editor;<\/strong><\/pre>\n<p>\u3053\u308c\u306f\u3001<code>setup()<\/code>\u5185\u3067\u30bb\u30c3\u30c8\u3057\u305f\u30ea\u30a2\u30af\u30c6\u30a3\u30d6\u306a\u5909\u6570\u3067\u3059\u3002<\/p>\n<pre>setup() {\r\n\r\n    return {\r\n        <strong>richEditor: Vue.reactive({}) \/\/ \ud83d\udc48 \u3053\u308c\u3067\u3059<\/strong>\r\n    }\r\n\r\n}<\/pre>\n<p>\u307e\u305f\u3001\u5909\u6570<code>status<\/code>\u3092\u5909\u66f4\u3059\u308b\u3053\u3068\u3067<code>Vue<\/code>\u304c\u8868\u793a\u5207\u308a\u66ff\u3048\u3092\u3057\u3066\u3044\u308b\u3053\u3068\u306b\u3082\u6ce8\u76ee\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u5207\u308a\u66ff\u3048\u5185\u5bb9\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<ul>\n<li>index\uff1a \u4e00\u89a7\u8868\u793a<\/li>\n<li>create\uff1a \u30bf\u30a4\u30c8\u30eb\u3001CKEditor \u3092\u8868\u793a\uff08\u4e2d\u8eab\u306f\u7a7a\uff09<\/li>\n<li>edit\uff1a \u30bf\u30a4\u30c8\u30eb\u3001CKEditor \u3092\u8868\u793a\uff08\u4e2d\u8eab\u306f\u8a72\u5f53\u30c7\u30fc\u30bf\uff09<\/li>\n<\/ul>\n<p>\u6b21\u306b\u3001\u500b\u5225\u8a73\u7d30\u30da\u30fc\u30b8\u306e\u30d3\u30e5\u30fc\u3067\u3059\u3002<\/p>\n<p><strong>resources\/views\/post\/show.blade.php<\/strong><\/p>\n<pre>&lt;html&gt;\r\n&lt;head&gt;\r\n    &lt;link rel=\"stylesheet\" href=\"https:\/\/stackpath.bootstrapcdn.com\/bootstrap\/4.5.0\/css\/bootstrap.min.css\"&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;div id=\"app\" class=\"container p-3\"&gt;\r\n    &lt;h1 class=\"mb-4\"&gt;<strong>{{ $post-&gt;title }}<\/strong>&lt;\/h1&gt;\r\n    <strong>{!! $post-&gt;description !!}<\/strong>\r\n&lt;\/div&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;<\/pre>\n<p>\u3053\u3061\u3089\u306f\u3001<code>$post-&gt;description<\/code>\u306e\u90e8\u5206\u304c\u30a8\u30b9\u30b1\u30fc\u30d7\u51e6\u7406<strong>\u3092\u3057\u306a\u3044\u3001<\/strong><code>{!! ... !!}<\/code>\u306b\u306a\u3063\u3066\u3044\u308b\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u306a\u305c\u306a\u3089\u3001<code>CKEditor<\/code>\u3067\u767b\u9332\u3055\u308c\u305f\u5185\u5bb9\u306f<code>HTML\u30bf\u30b0<\/code>\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u304b\u3089\u3067\u3059\u3002<\/p>\n<h1>\u304a\u307e\u3051\uff1a\u753b\u50cf\u306e\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u6a5f\u80fd\u3092\u3064\u3051\u308b<\/h1>\n<p><code>CKEditor<\/code>\u3067\u753b\u50cf\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u6a5f\u80fd\u3092\u4f7f\u3048\u308b\u3088\u3046\u306b\u3059\u308b\u305f\u3081\u306b\u306f\u3001\u6709\u6599\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u4f7f\u3046\u304b\u3001\u72ec\u81ea\u306b\u30a2\u30c0\u30d7\u30bf\u30fc\u3092\u3064\u304f\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u3082\u3061\u308d\u3093\u6709\u6599\u30d7\u30e9\u30b0\u30a4\u30f3\u306f\u591a\u6a5f\u80fd\u3067\u3044\u3044\u306e\u3067\u3059\u304c\u3001\u4eca\u56de\u306f\u300c<strong>\u30b7\u30f3\u30d7\u30eb\u306aCMS<\/strong>\u300d\u304c\u30c6\u30fc\u30de\u306a\u306e\u3067\u72ec\u81ea\u30a2\u30c0\u30d7\u30bf\u30fc\u3067\u5b9f\u88c5\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2>\u5c02\u7528\u306e\u30a2\u30c0\u30d7\u30bf\u30fc\u30fb\u30af\u30e9\u30b9\u3092\u3064\u304f\u308b<\/h2>\n<p>\u307e\u305a\u3001<code>JavaScript<\/code>\u306e\u30af\u30e9\u30b9\u3092\u3064\u304f\u308a\u307e\u3059\u3002\uff08\u3053\u308c\u304c\u30a2\u30c0\u30d7\u30bf\u30fc\u306b\u306a\u308a\u307e\u3059\uff09<\/p>\n<p><strong>resources\/views\/post\/index.blade.php<\/strong><\/p>\n<pre>&lt;!-- \u7701\u7565 --&gt;\r\n\r\n&lt;script&gt;\r\n\r\n    <strong>class UploadAdapter {<\/strong>\r\n\r\n<strong>        constructor(loader) {<\/strong>\r\n\r\n<strong>            this.loader = loader;<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n\r\n<strong>        upload() {<\/strong>\r\n\r\n<strong>            return this.loader.file<\/strong>\r\n<strong>                .then(file =&gt; {<\/strong>\r\n\r\n<strong>                    return new Promise((resolve, reject) =&gt; {<\/strong>\r\n\r\n<strong>                        const url = '\/post\/upload_image';<\/strong>\r\n<strong>                        let formData = new FormData();<\/strong>\r\n<strong>                        formData.append('image', file);<\/strong>\r\n\r\n<strong>                        axios.post(url, formData)<\/strong>\r\n<strong>                            .then(response =&gt; {<\/strong>\r\n\r\n<strong>                                if(response.data.result === true) {<\/strong>\r\n\r\n<strong>                                    const imageUrl = response.data.image_url;<\/strong>\r\n<strong>                                    resolve({ default: imageUrl });<\/strong>\r\n\r\n<strong>                                } else {<\/strong>\r\n\r\n<strong>                                    reject();<\/strong>\r\n\r\n<strong>                                }<\/strong>\r\n\r\n<strong>                            })<\/strong>\r\n<strong>                            .catch(error =&gt; {<\/strong>\r\n\r\n<strong>                                reject();<\/strong>\r\n\r\n<strong>                            });<\/strong>\r\n\r\n<strong>                    });<\/strong>\r\n\r\n<strong>                });<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n\r\n<strong>    }<\/strong>\r\n\r\n\/\/ \u7701\u7565<\/pre>\n<p>\u4e2d\u8eab\u3068\u3057\u3066\u306f\u3001\u4ee5\u4e0b\u306e\u3053\u3068\u3092\u5b9f\u884c\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<ol>\n<li>\u753b\u50cf\u304c\u9078\u629e\u3055\u308c\u305f\u3089\u3001axios \u3067\u30d5\u30a1\u30a4\u30eb\u3092 Laravel \u3078\u9001\u4fe1<\/li>\n<li>Laravel \u3067\u753b\u50cf\u3092\u4fdd\u5b58<\/li>\n<li>\u8fd4\u3055\u308c\u305f\u753b\u50cfURL\u304c &lt;img&gt; \u30bf\u30b0\u306b\u4f7f\u308f\u308c\u308b\u3088\u3046\u306b resolve() \u306b\u30bb\u30c3\u30c8<\/li>\n<\/ol>\n<p>\u305d\u3057\u3066\u3001\u3053\u306e\u30a2\u30c0\u30d7\u30bf\u30fc\u3092<code>Vue<\/code>\u5185\u306b\u3064\u304f\u3063\u305f<code>initRichEditor()<\/code>\u3067\u30bb\u30c3\u30c8\u3057\u307e\u3059\u3002<\/p>\n<pre>\/\/ \u7701\u7565\r\n\r\ninitRichEditor(defaultDescription) {\r\n\r\n    const target = document.querySelector('#editor');\r\n    ClassicEditor.create(target)\r\n        .then(editor =&gt; {\r\n\r\n            this.postTitle = this.currentPost.title || '';\r\n            this.richEditor = editor;\r\n            <strong>\/\/ \ud83d\udc47 \u3053\u3053\u3067\u30a2\u30c0\u30d7\u30bf\u30fc\u3092\u30bb\u30c3\u30c8\u3057\u307e\u3059<\/strong>\r\n<strong>            this.richEditor.plugins<\/strong>\r\n<strong>                .get('FileRepository')<\/strong>\r\n<strong>                .createUploadAdapter = loader  =&gt; {<\/strong>\r\n\r\n<strong>                    return new UploadAdapter(loader);<\/strong>\r\n\r\n<strong>                };<\/strong>\r\n            this.richEditor.setData(defaultDescription);\r\n\r\n        });\r\n\r\n}<\/pre>\n<h2>\u30d5\u30a1\u30a4\u30eb\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u90e8\u5206\u3092\u3064\u304f\u308b<\/h2>\n<p>\u753b\u50cf\u306e\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u6a5f\u80fd\u3092\u3064\u304f\u308a\u307e\u3059\u3002<br \/>\n\u307e\u305a\u3001\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u7528\u306e\u30eb\u30fc\u30c8\u3092\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><strong>routes\/web.php<\/strong><\/p>\n<pre>Route::prefix('post')-&gt;group(function(){\r\n\r\n    \/\/ \u7701\u7565\r\n    Route::post('\/', [PostController::class, 'store']);\r\n    <strong>Route::post('\/upload_image', [PostController::class, 'upload_image']); \/\/ \ud83d\udc48 \u3053\u3053\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f<\/strong>\r\n    \/\/ \u7701\u7565\r\n\r\n});<\/pre>\n<p>\u305d\u3057\u3066\u3001\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306b<code>upload_image()<\/code>\u30e1\u30bd\u30c3\u30c9\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<p><strong>app\/Http\/Controllers\/PostController.php<\/strong><\/p>\n<pre>&lt;?php\r\n\r\n\/\/ \u7701\u7565\r\n\r\nclass PostController extends Controller\r\n{\r\n    \/\/ \u7701\u7565\r\n\r\n    <strong>public function upload_image(Request $request) {<\/strong>\r\n\r\n<strong>        \/\/ \u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u306f\u7701\u7565\u3057\u3066\u307e\u3059<\/strong>\r\n\r\n<strong>        $file = $request-&gt;file('image');<\/strong>\r\n<strong>        $extension = $file-&gt;extension();<\/strong>\r\n<strong>        $path = 'public\/cms_images';<\/strong>\r\n<strong>        $name = date('Ymd-His') .'_'. Str::random(5) .'.'. $extension;<\/strong>\r\n<strong>        $request-&gt;file('image')-&gt;storeAs($path, $name);<\/strong>\r\n\r\n<strong>        return [<\/strong>\r\n<strong>            'result' =&gt; true,<\/strong>\r\n<strong>            'image_url' =&gt; url('\/storage\/cms_images\/'. $name)<\/strong>\r\n<strong>        ];<\/strong>\r\n\r\n<strong>    }<\/strong>\r\n}<\/pre>\n<p>\u6700\u5f8c\u306b\u5fd8\u308c\u3066\u306f\u3044\u3051\u306a\u3044\u306e\u304c\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u3059\u3002<\/p>\n<pre><strong>php artisan storage:link<\/strong><\/pre>\n<p>\u3053\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u3067\u3001<code>\/public<\/code>\u30d5\u30a9\u30eb\u30c0\u5185\u306b<code>\/storage\/app\/public<\/code>\u3078\u306e\u30b7\u30f3\u30dc\u30ea\u30c3\u30af\u30ea\u30f3\u30af\u304c\u8cbc\u3089\u308c\u308b\u3053\u3068\u306b\u306a\u308a\u3001\u30d6\u30e9\u30a6\u30b6\u304b\u3089\u76f4\u63a5\u30a2\u30af\u30bb\u30b9\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u203b\u306a\u304a\u3001\u3082\u3057\u753b\u50cf\u306e\u7ba1\u7406\u3092\u3057\u305f\u3044\u3068\u3044\u3046\u3053\u3068\u3067\u3042\u308c\u3070<code>cms_images<\/code>\u306e\u3088\u3046\u306aDB\u30c6\u30fc\u30d6\u30eb\u3092\u7528\u610f\u3057\u3001\u305d\u3053\u306b\u30d1\u30b9\u306a\u3069\u3092\u4fdd\u5b58\u3057\u3066\u304a\u304f\u3068\u3044\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<h1>\u30c6\u30b9\u30c8\u3057\u3066\u307f\u308b<\/h1>\n<p>\u3067\u306f\u3001\u5b9f\u969b\u306b\u30c6\u30b9\u30c8\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u2757<\/p>\n<p>\u307e\u305a\u306f\u3001\u300c<strong>http:\/\/******\/post<\/strong>\u300d\u306b\u30d6\u30e9\u30a6\u30b6\u3067\u30a2\u30af\u30bb\u30b9\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8459\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/12\/laravel_cms_2.png\" alt=\"\" width=\"640\" height=\"407\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/12\/laravel_cms_2.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/12\/laravel_cms_2-300x191.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf\u304c\u4e00\u89a7\u8868\u793a\u3055\u308c\u308b\u306e\u3067\u3001\u307e\u305a\u306f\u3001\u65b0\u898f\u8ffd\u52a0\u3067\u3059\u3002<br \/>\n\u300c<strong>\u8ffd\u52a0<\/strong>\u300d\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u3059\u308b\u3068\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8463\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/12\/laravel_cms_3.png\" alt=\"\" width=\"640\" height=\"269\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/12\/laravel_cms_3.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/12\/laravel_cms_3-300x126.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u30bf\u30a4\u30c8\u30eb\u3068<code>CKEditor<\/code>\u304c\u8868\u793a\u3055\u308c\u307e\u3057\u305f\u3002<br \/>\n\u3067\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5165\u529b\u3057\u3066\u4fdd\u5b58\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u2757<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8462\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/12\/laravel_cms_4.png\" alt=\"\" width=\"640\" height=\"519\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/12\/laravel_cms_4.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/12\/laravel_cms_4-300x243.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u3059\u308b\u3068\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8460\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/12\/laravel_cms_5.png\" alt=\"\" width=\"709\" height=\"241\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/12\/laravel_cms_5.png 709w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/12\/laravel_cms_5-300x102.png 300w\" sizes=\"auto, (max-width: 709px) 100vw, 709px\" \/><\/p>\n<p>\u753b\u9762\u304c\u5207\u308a\u66ff\u308f\u308a\u3001\u30c7\u30fc\u30bf\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<p>\u3067\u306f\u3001\u300c\u78ba\u8a8d\u300d\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8461\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/12\/laravel_cms_6.png\" alt=\"\" width=\"288\" height=\"438\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/12\/laravel_cms_6.png 288w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/12\/laravel_cms_6-197x300.png 197w\" sizes=\"auto, (max-width: 288px) 100vw, 288px\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\u5148\u307b\u3069\u6295\u7a3f\u3057\u305f\u5185\u5bb9\u304c\u8868\u793a\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u6210\u529f\u3067\u3059\ud83d\ude0a\u2728<\/p>\n<p>\u3067\u306f\u3001\u6b21\u306b\u300c<strong>\u5909\u66f4<\/strong>\u300d\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<br \/>\n\u3059\u308b\u3068\u3001\u521d\u671f\u72b6\u614b\u3067\u30bf\u30a4\u30c8\u30eb\u3001<code>CKEditor<\/code>\u306b\u30c6\u30ad\u30b9\u30c8\u304c\u8868\u793a\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8464\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/12\/laravel_cms_7.png\" alt=\"\" width=\"753\" height=\"387\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/12\/laravel_cms_7.png 753w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/12\/laravel_cms_7-300x154.png 300w\" sizes=\"auto, (max-width: 706px) 89vw, (max-width: 767px) 82vw, 740px\" \/><\/p>\n<p>\u3053\u308c\u3092\u3001\u5909\u66f4\u3057\u3066\u4fdd\u5b58\u3057\u3066\u78ba\u8a8d\u3057\u3066\u307f\u308b\u3068\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8465\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/12\/laravel_cms_8.png\" alt=\"\" width=\"640\" height=\"229\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/12\/laravel_cms_8.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/12\/laravel_cms_8-300x107.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n<span style=\"font-size: 1rem;\">\u3053\u3061\u3089\u3082\u3046\u307e\u304f\u5909\u66f4\u3067\u304d\u307e\u3057\u305f\u3002<\/span><\/p>\n<p>\u6210\u529f\u3067\u3059\ud83d\ude0a\u2728<\/p>\n<h1>\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b<\/h1>\n<p>\u4ee5\u4e0b\u304b\u3089\u3001\u4eca\u56de\u5b9f\u969b\u306b\u958b\u767a\u3057\u305f\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u4e00\u5f0f\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u307e\u3059\u3002<\/p>\n<a  data-e-Disable-Page-Transition=\"true\" class=\"download-link\" title=\"\" href=\"https:\/\/blog.capilano-fw.com?download=8455&amp;tmstv=1777656919\" rel=\"nofollow\" id=\"download-link-8455\" data-redirect=\"false\" >\n\t\u3010Laravel\u3011\u30b7\u30f3\u30d7\u30eb\u306bCMS\u3092\u5b9f\u88c5\u3059\u308b<\/a>\n\n<p>\u203b \u305f\u3060\u3057\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u306a\u3069\u306f\u3054\u81ea\u8eab\u3067\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h1>CKEditor 5 \u3092\u4f7f\u3046\u3068\u304d\u306e\u6ce8\u610f\u70b9<\/h1>\n<p><code>CKEditor 5<\/code>\u306e\u30e9\u30a4\u30bb\u30f3\u30b9\u306f\u300c<strong>GPL 2+<\/strong>\u300d\u3067\u3059\u3002<br \/>\nMIT\u30e9\u30a4\u30bb\u30f3\u30b9\u3068\u9055\u3044\u3001<code>CKEditor<\/code>\u3092\u542b\u3080\u300c\u6d3e\u751f\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u300d\u3092\u914d\u5e03\u3059\u308b\u5834\u5408\u3001<strong>\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306e\u958b\u793a\u304c\u7fa9\u52d9\u4ed8\u3051\u3089\u308c\u3066\u3044\u307e\u3059\u3002<\/strong><\/p>\n<p>\u305d\u306e\u305f\u3081\u3001CKEditor\u3092\u542b\u3080\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u914d\u5e03\u3059\u308b\u5834\u5408\u306f\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<h1>\u304a\u308f\u308a\u306b<\/h1>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u4eca\u56de\u306f<code>Laravel<\/code> + <code>CKEditor 5<\/code>\u3067\u30b7\u30f3\u30d7\u30eb\u306a<code>CMS<\/code>\u3092\u4f5c\u3063\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p><code>wordpress<\/code>\u307b\u3069\u9ad8\u6a5f\u80fd\u3058\u3083\u306a\u304f\u3066\u3044\u3044\u3051\u3069\u3001\u3061\u3087\u3063\u3068\u3057\u305f\u3053\u3068\u306f\u81ea\u7531\u306b\u6295\u7a3f\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u305f\u3044\u3001\u3068\u3044\u3046\u5834\u5408\u306b\u306f\u3061\u3087\u3046\u3069\u3044\u3044\u3093\u3058\u3083\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<p>\u306a\u304a\u3001DB\u30c6\u30fc\u30d6\u30eb\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u540d\u306a\u306e\u3067\u3059\u304c\u3001\u5f53\u521d\u306f<code>wordpress<\/code>\u3092\u53c2\u8003\u306b\u3057\u3066<code>description<\/code>\u3067\u306f\u306a\u304f\u3001<code>content<\/code>\u3068\u3057\u3066\u3044\u307e\u3057\u305f\u3002\uff08\u5b9f\u969b\u306e <code>wordpress<\/code> \u306f <code>post_content<\/code>\u3067\u3059\uff09<\/p>\n<p>\u3057\u304b\u3057\u3001\u9014\u4e2d\u3067IDE\u306b\u30a8\u30e9\u30fc\u304c\u8868\u793a\u3055\u308c\u308b\u3053\u3068\u306b\u306a\u3063\u305f\u306e\u3067\u3001<code>content<\/code>\u3068\u3044\u3046\u540d\u524d\u306f\u5909\u66f4\u3059\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002\uff08\u30a8\u30e9\u30fc\u5185\u5bb9\u3092\u8aad\u3080\u9650\u308a\u3001\u3059\u3067\u306b\u5225\u306e\u5909\u6570\u3068\u3057\u3066<code>Model<\/code>\u304c\u4f7f\u3063\u3066\u3044\u308b\u3088\u3046\u3067\u3059\uff09<\/p>\n<p>\u307e\u3060\u307e\u3060\u77e5\u3089\u306a\u3044\u3053\u3068\u306f\u591a\u3044\u3067\u3059\u306d\ud83d\ude05<\/p>\n<p>\u3068\u306b\u3082\u304b\u304f\u306b\u3082\u3001<code>CKEditor<\/code>\u306f\u306a\u304b\u306a\u304b\u4f7f\u3044\u52dd\u624b\u304c\u826f\u304b\u3063\u305f\u306e\u3067\u3001\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\u2757<\/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\u660e\u6670\u5922\u304c\u898b\u308c\u308b\u3088\u3046\u3001\u30c8\u30ec\u30fc\u30cb\u30f3\u30b0\u4e2d\u3002<br \/>\n\u30bc\u30f3\u30bc\u30f3\u3067\u304d\u306a\u3044\uff08\u7b11\uff09\u300d<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u300cPHP\u3067\u30b5\u30a4\u30c8\u3092\u3064\u304f\u308b\u300d\u3068\u3044\u3048\u3070\u3001\u8fd1\u5e74\u3067\u306fLaravel\u3001\u305d\u3057\u3066wordpress\u304c\u30e1\u30a4\u30f3\u306e\u9078\u629e\u80a2\u306b\u306a\u308b\u306e\u3067\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002 \uff082020.12.2 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.capilano-fw.com\/?p=8449\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;\u3010Laravel\u3011\u30b7\u30f3\u30d7\u30eb\u306bCMS\u3092\u5b9f\u88c5\u3059\u308b\uff08CKEditor 5\uff09&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":8452,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,12],"tags":[228],"class_list":["post-8449","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-laravel","category-vue-js","tag-cms"],"_links":{"self":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/8449","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=8449"}],"version-history":[{"count":10,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/8449\/revisions"}],"predecessor-version":[{"id":8531,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/8449\/revisions\/8531"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/media\/8452"}],"wp:attachment":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8449"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8449"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8449"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}