{"id":9881,"date":"2021-12-27T07:00:56","date_gmt":"2021-12-26T22:00:56","guid":{"rendered":"https:\/\/blog.capilano-fw.com\/?p=9881"},"modified":"2021-12-15T01:44:56","modified_gmt":"2021-12-14T16:44:56","slug":"%e3%80%90laravel-pusher%e3%80%91%e3%81%bf%e3%82%93%e3%81%aa%e3%81%a7%e5%85%b1%e5%90%8c%e7%b7%a8%e9%9b%86%e3%81%a7%e3%81%8d%e3%82%8b%e6%a9%9f%e8%83%bd%e3%82%92%e3%81%a4%e3%81%8f%e3%82%8b","status":"publish","type":"post","link":"https:\/\/blog.capilano-fw.com\/?p=9881","title":{"rendered":"\u3010Laravel + Pusher\u3011\u307f\u3093\u306a\u3067\u5171\u540c\u7de8\u96c6\u3067\u304d\u308b\u6a5f\u80fd\u3092\u3064\u304f\u308b"},"content":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u5148\u65e5 <strong>paiza<\/strong> \u304c\u300c<a href=\"https:\/\/prtimes.jp\/main\/html\/rd\/p\/000000094.000012063.html\" target=\"_blank\" rel=\"noopener\">\u7dca\u6025\u4e8b\u614b\u5ba3\u8a00\u89e3\u9664\u5f8c\u306eIT\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u30ea\u30e2\u30fc\u30c8\u30ef\u30fc\u30af\u5b9f\u614b\u8abf\u67fb<\/a>\u300d\u3068\u3044\u3046\u30a2\u30f3\u30b1\u30fc\u30c8\u7d50\u679c\u3092\u516c\u958b\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u3053\u306e\u4e2d\u3067\u79c1\u304c\u8208\u5473\u6df1\u304b\u3063\u305f\u306e\u304c\u3001\u300c<strong>\u8ee2\u8077\u306e\u6761\u4ef6\u306b\u30ea\u30e2\u30fc\u30c8\u30ef\u30fc\u30af\u304c\u5fc5\u8981\u304b\u3069\u3046\u304b\uff1f<\/strong>\u300d\u3068\u3044\u3046\u8cea\u554f\u3067\u3001\u7d50\u679c\u306f<\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li><strong>\u9031\u306e\u534a\u5206\u3050\u3089\u3044\u5fc5\u8981\uff0830.6%\uff09<\/strong><\/li>\n<li><strong>\u30d5\u30eb\u30ea\u30e2\u30fc\u30c8\uff0827.9%\uff09<\/strong><\/li>\n<li><strong>\u9031\uff11\u3042\u308c\u3070OK\uff0813.6%\uff09<\/strong><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\u3068\u3001\u5c11\u306a\u304f\u3068\u3082\u30ea\u30e2\u30fc\u30c8\u30ef\u30fc\u30af\u304c\u4f01\u696d\u3092\u9078\u3076\u6761\u4ef6\u306e\uff11\u3064\u306b\u306a\u3063\u3066\u3044\u308b\u3088\u3046\u3067\u3057\u305f\u3002<\/p>\n<p>\uff08\u9006\u306b\u51fa\u793e\u3057\u305f\u3044\u8003\u3048\u3066\u3044\u308b\u4eba\u306f\u305f\u3063\u305f<code>2.1\uff05<\/code>\u3067\u3057\u305f\uff09<\/p>\n<p>\u3069\u3046\u3084\u3089\u30ea\u30e2\u30fc\u30c8\u30ef\u30fc\u30af\u3092\u5b9f\u65bd\u3059\u308b\u3068\u3044\u308d\u3044\u308d\u3068\u8ab2\u984c\u3082\u3042\u308b\u305d\u3046\u3067\u3059\u304c\u3001\u3084\u306f\u308a\u30cd\u30c3\u30c8\u74b0\u5883\u304c\u6574\u3063\u305f\u304a\u304b\u3052\u3067\u3053\u3046\u3044\u3063\u305f\u610f\u898b\u304c\u5897\u3048\u3066\u3044\u308b\u90e8\u5206\u3082\u5927\u304d\u3044\u3093\u3060\u308d\u3046\u306a\u3068\u8003\u3048\u3066\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u3057\u3066\u305d\u3093\u306a\u4e2d\u3001\u3042\u308b\u3064\u304f\u3063\u3066\u307f\u305f\u304b\u3063\u305f\u3053\u3068\u3092\u601d\u3044\u51fa\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u308c\u304c\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p><strong style=\"font-size: 35px;\">\u300c\u30ea\u30a2\u30eb\u30a2\u30a4\u30e0\u5171\u540c\u7de8\u96c6\u300d<\/strong><\/p>\n<p>\u6a5f\u80fd\u3067\u3059\u3002<\/p>\n<p>\u3068\u3044\u3046\u306e\u3082\u3001\u4ee5\u524d\u300c<strong>Google\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8<\/strong>\u300d\u3092\uff12\u4eba\u3067\u5225\u74b0\u5883\u304b\u3089\u7de8\u96c6\u3057\u3066\u3044\u305f\u306e\u3067\u3059\u304c\u3001\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u3067\u5411\u3053\u3046\u5074\u306e\u5909\u66f4\u70b9\u304c\u66f4\u65b0\u3055\u308c\u3066\u3001\u3068\u3066\u3082\u9a5a\u3044\u305f\u304b\u3089\u3067\u3059\u3002\uff08\u306a\u3093\u3068\u30d5\u30a9\u30fc\u30ab\u30b9\u3057\u3066\u3044\u308b\u4f4d\u7f6e\u307e\u3067\u5171\u6709\u3055\u308c\u3066\u307e\u3057\u305f\ud83d\ude33\uff09<\/p>\n<p>\u305d\u3053\u3067\u2757<\/p>\n<p>\u4eca\u56de\u306f\u3001\u300c<strong>Laravel + Pusher<\/strong>\u300d\u3092\u4f7f\u3063\u3066\u300c<strong>\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u5171\u540c\u7de8\u96c6<\/strong>\u300d\u6a5f\u80fd\u3092\u3064\u304f\u3063\u3066\u307f\u305f\u3044\u3068\u601d\u3044\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>\u203b \u306a\u304a\u3001\u8a18\u4e8b\u3092\u66f8\u3044\u3066\u3044\u3066\u60a9\u307f\u307e\u3057\u305f\u304c\u3001\u6700\u7d42\u7684\u306b\u308f\u304b\u308a\u3084\u3059\u3055\u3092\u91cd\u8996\u3057\u3066\u300c\u8d85\u30b7\u30f3\u30d7\u30eb\u69cb\u9020\u300d\u306b\u3057\u3066\u3044\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u30e6\u30fc\u30b6\u30d3\u30ea\u30c6\u30a3\u30fb\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30fb\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u306f\u4e00\u5207\u8003\u616e\u3057\u3066\u3044\u307e\u305b\u3093\u3002\u304a\u6c17\u3092\u3064\u3051\u304f\u3060\u3055\u3044\u3002m(_ _)m<\/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\u3088\u3053\u3059\u304b\u6d77\u8ecd\u30ab\u30ec\u30fc\u6700\u9ad8\u3067\u3057\u305f\u2757<br \/>\n\uff08\u30ec\u30c8\u30eb\u30c8\u3067\u3059\u304c \ud83c\udf5b\u2728\uff09\u300d<\/p>\n<p><strong>\u958b\u767a\u74b0\u5883\uff1a<\/strong> Laravel 8.x\u3001Vue 3<\/p>\n<h1>\u524d\u63d0\u3068\u3057\u3066<\/h1>\n<p>\u4eca\u56de\u306f\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u7de8\u96c6\u3092\u5b9f\u73fe\u3059\u308b\u305f\u3081\u306b<code>Pusher<\/code>\u3068\u3044\u3046\u30b5\u30fc\u30d3\u30b9\u3092\u4f7f\u3044\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001<code>Laravel<\/code>\u3067<code>Pusher<\/code>\u304c\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u308b\u3053\u3068\u304c\u524d\u63d0\u3067\u3059\u3002<\/p>\n<p>\u3082\u3057\u3001\u307e\u3060\u306e\u65b9\u306f\u4ee5\u4e0b\u3092\u53c2\u8003\u306b\u3057\u3066\u5148\u306b\u6e96\u5099\u3057\u3066\u304a\u3044\u3066\u304f\u3060\u3055\u3044\u3002\uff08\u3061\u3087\u3063\u3068\u53e4\u3044\u8a18\u4e8b\u304b\u3082\u3067\u3059\u304c\u2026\ud83d\ude05\uff09<\/p>\n<p><strong>\ud83d\udcdd \u53c2\u8003\u30da\u30fc\u30b8<\/strong>\uff1a\u00a0<a href=\"https:\/\/blog.capilano-fw.com\/?p=1418#i-6\" target=\"_blank\" rel=\"noopener\">\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u30fb\u30c1\u30e3\u30c3\u30c8\u3092\u3064\u304f\u308b\uff1a\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u306b\u66f4\u65b0\u3059\u308b\u90e8\u5206\u3092\u3064\u304f\u308b<\/a><\/p>\n<h1>\u5fc5\u8981\u306a\u30d5\u30a1\u30a4\u30eb\u3092\u7528\u610f\u3059\u308b<\/h1>\n<p>\u3067\u306f\u3001\u4eca\u56de\u306e\u6a5f\u80fd\u306b\u5fc5\u8981\u306a\u30d5\u30a1\u30a4\u30eb\u3092\u3064\u304f\u3063\u3066\u3044\u304d\u307e\u3057\u3087\u3046\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 JointDocument -msc<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u300c<strong>\u30e2\u30c7\u30eb<\/strong>\u300d\u300c<strong>\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3<\/strong>\u300d\u300c<strong>Seeder<\/strong>\u300d\u3001\u305d\u3057\u3066\u300c<strong>\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc<\/strong>\u300d\u30d5\u30a1\u30a4\u30eb\u304c\u4e00\u6c17\u306b\u4f5c\u6210\u3055\u308c\u308b\u306e\u3067\u305d\u308c\u305e\u308c\u4e2d\u8eab\u3092\u5909\u66f4\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<h1>\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u3092\u6e96\u5099\u3059\u308b<\/h1>\n<p>\u3067\u306f\u3001\u307e\u305a\u306fDB\u30c6\u30fc\u30d6\u30eb\u3092\u3064\u304f\u308b\u8a2d\u8a08\u56f3\u306b\u306a\u308b\u300c<strong>\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3<\/strong>\u300d\u3092\u3064\u304f\u308a\u307e\u3059\u3002<\/p>\n<p><strong>database\/migrations\/****_**_**_******_create_joint_documents_table.php<\/strong><\/p>\n<pre>\/\/ \u7701\u7565\r\n\r\npublic function up()\r\n{\r\n    <strong>Schema::create('joint_documents', function (Blueprint $table) {<\/strong>\r\n<strong>        $table-&gt;id();<\/strong>\r\n<strong>        $table-&gt;unsignedBigInteger('version')-&gt;default(1)-&gt;comment('\u30d0\u30fc\u30b8\u30e7\u30f3');<\/strong>\r\n<strong>        $table-&gt;text('body')-&gt;comment('\u6587\u7ae0\u5185\u5bb9');<\/strong>\r\n<strong>        $table-&gt;timestamps();<\/strong>\r\n<strong>    });<\/strong>\r\n}<\/pre>\n<h1>Seeder \u3092\u6e96\u5099\u3059\u308b<\/h1>\n<p>\u7d9a\u3044\u3066\u3001\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u3067DB\u30c6\u30fc\u30d6\u30eb\u3092\u3064\u304f\u3063\u305f\u3042\u3068\u306b\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf\u3092\u8ffd\u52a0\u3059\u308b\u305f\u3081\u306e\u300c<strong>Seeder<\/strong>\u300d\u30d5\u30a1\u30a4\u30eb\u3067\u3059\u3002<\/p>\n<p><strong>database\/seeders\/JointDocumentSeeder.php<\/strong><\/p>\n<pre>&lt;?php\r\n\r\nnamespace Database\\Seeders;\r\n\r\n<strong>use App\\Models\\JointDocument;<\/strong>\r\nuse Illuminate\\Database\\Seeder;\r\n\r\nclass JointDocumentSeeder extends Seeder\r\n{\r\n    \/**\r\n     * Run the database seeds.\r\n     *\r\n     * @return void\r\n     *\/\r\n    <strong>public function run()<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        for($i = 1; $i &lt;= 10; $i++) {<\/strong>\r\n\r\n<strong>            $document = new JointDocument();<\/strong>\r\n<strong>            $document-&gt;body = \"\u30c6\u30b9\u30c8\u6587\u66f8\u5185\u5bb9\\n\u30c6\u30b9\u30c8\u6587\u66f8\u5185\u5bb9\\n\u30c6\u30b9\u30c8\u6587\u66f8\u5185\u5bb9\";<\/strong>\r\n<strong>            $document-&gt;save();<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n<strong>    }<\/strong>\r\n}<\/pre>\n<p><code>Seeder<\/code>\u30d5\u30a1\u30a4\u30eb\u306f\u3064\u304f\u3063\u305f\u3060\u3051\u3067\u306f\u5b9f\u884c\u3067\u304d\u306a\u3044\u306e\u3067\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 App\\Models\\Document;\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        \/\/ \u7701\u7565\r\n\r\n        <strong>$this-&gt;call(JointDocumentSeeder::class);<\/strong>\r\n    }\r\n}<\/pre>\n<p>\u3067\u306f\u3001\u3053\u306e\u72b6\u614b\u3067<code>DB<\/code>\u3092\u518d\u69cb\u7bc9\u3057\u3066\u307f\u307e\u3057\u3087\u3046\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>\u203b \u3061\u306a\u307f\u306b\u79c1\u306e\u5834\u5408\u306f\u3001\u30a8\u30a4\u30ea\u30a2\u30b9\u3092\u767b\u9332\u3057\u3066<code>pam:fs<\/code>\u3067\u4e0a\u306e\u30b3\u30de\u30f3\u30c9\u304c\u5b9f\u884c\u3055\u308c\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u3002\u30db\u30f3\u30c8\u697d \ud83d\ude04\u2728<\/p>\n<p>\u5b9f\u969b\u306e\u30c6\u30fc\u30d6\u30eb\u306f\u3053\u3046\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9887\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/12\/laravel_coedit_1.png\" alt=\"\" width=\"537\" height=\"425\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/12\/laravel_coedit_1.png 537w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/12\/laravel_coedit_1-300x237.png 300w\" sizes=\"auto, (max-width: 537px) 100vw, 537px\" \/><\/p>\n<h1>\u30e2\u30c7\u30eb\u3092\u6e96\u5099\u3059\u308b<\/h1>\n<p>\u7d9a\u3044\u3066\u3001\u30e2\u30c7\u30eb\u306b\u300c<strong>\u4fdd\u5b58\u6642\u306b\u81ea\u52d5\u3067\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\uff0b\uff11\u3059\u308b<\/strong>\u300d\u3088\u3046\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u306f\u5f8c\u307b\u3069\u3054\u7d39\u4ecb\u3057\u307e\u3059\u304c\u3001\u300c\u6700\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u30c1\u30a7\u30c3\u30af\u300d\u304c\u5fc5\u8981\u306b\u306a\u308b\u304b\u3089\u3067\u3059\u3002<\/p>\n<pre>\/\/ \u7701\u7565\r\n\r\nclass JointDocument extends Model\r\n{\r\n    use HasFactory;\r\n\r\n    <strong>protected static function booted()<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        static::saving(function ($joint_document) {<\/strong>\r\n\r\n<strong>            $joint_document-&gt;version++; \/\/ \u4fdd\u5b58\u6642\u306b\u30d0\u30fc\u30b8\u30e7\u30f3\u3092 +1 \u3059\u308b<\/strong>\r\n\r\n<strong>        });<\/strong>\r\n<strong>    }<\/strong>\r\n}<\/pre>\n<p>\u203b \u306a\u304a\u3001\u4eca\u56de\u306f\u30e2\u30c7\u30eb\u306b\u76f4\u63a5<code>saving<\/code>\u30a4\u30d9\u30f3\u30c8\u3092\u30bb\u30c3\u30c8\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u5c02\u7528\u30a4\u30d9\u30f3\u30c8\u3068\u3057\u3066\u30bb\u30c3\u30c8\u3057\u3066\u3082OK\u3067\u3059\u3002\u72b6\u6cc1\u306b\u3088\u3063\u3066\u306f\u5207\u308a\u5206\u3051\u305f\u65b9\u304c\u3044\u3044\u304b\u3082\u3067\u3059\u306d\u3002<\/p>\n<h1>Pusher \u306e\u901a\u77e5\u30a4\u30d9\u30f3\u30c8\u3092\u3064\u304f\u308b<\/h1>\n<p>\u6b21\u306b\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306a\u306e\u3067\u3059\u304c\u3001\u5148\u306b\u305d\u306e\u4e2d\u3067\u5fc5\u8981\u306a\u30a4\u30d9\u30f3\u30c8\u3092\u4f5c\u3063\u3066\u304a\u304d\u307e\u3059\u3002\u8981\u306f\u3001<code>Pusher<\/code>\u306b\u300c<strong>\u30c7\u30fc\u30bf\u66f4\u65b0\u3055\u308c\u305f\u304b\u3089\u3001\u901a\u77e5\u30e8\u30ed\u30b7\u30af\u2757<\/strong>\u300d\u3092\u4f1d\u3048\u308b\u90e8\u5206\u3067\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><strong>php artisan make:event JointDocumentUpdated<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u3001\u30a4\u30d9\u30f3\u30c8\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\u307e\u3059\u3002<\/p>\n<p><strong>app\/Events\/JointDocumentUpdated.php<\/strong><\/p>\n<pre>&lt;?php\r\n\r\nnamespace App\\Events;\r\n\r\n<strong>use App\\Models\\JointDocument;<\/strong>\r\nuse Illuminate\\Broadcasting\\Channel;\r\nuse Illuminate\\Broadcasting\\InteractsWithSockets;\r\nuse Illuminate\\Broadcasting\\PresenceChannel;\r\nuse Illuminate\\Broadcasting\\PrivateChannel;\r\nuse Illuminate\\Contracts\\Broadcasting\\ShouldBroadcast;\r\nuse Illuminate\\Foundation\\Events\\Dispatchable;\r\nuse Illuminate\\Queue\\SerializesModels;\r\n\r\nclass JointDocumentUpdated<strong> implements ShouldBroadcast<\/strong>\r\n{\r\n    use Dispatchable, InteractsWithSockets, SerializesModels;\r\n\r\n    <strong>private $joint_document;<\/strong>\r\n\r\n<strong>    public function __construct(JointDocument $joint_document)<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        $this-&gt;joint_document = $joint_document;<\/strong>\r\n<strong>    }<\/strong>\r\n\r\n<strong>    public function broadcastOn()<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        return new PrivateChannel('joint-document-updated.'. $this-&gt;joint_document-&gt;id);<\/strong>\r\n<strong>    }<\/strong>\r\n\r\n<strong>    public function broadcastWith() \/\/ \u3053\u3053\u306b JS \u5074\u3078\u9001\u308b\u30c7\u30fc\u30bf\u3092\u30bb\u30c3\u30c8\u3059\u308b<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        return [<\/strong>\r\n<strong>            'joint_document' =&gt; $this-&gt;joint_document<\/strong>\r\n<strong>        ];<\/strong>\r\n<strong>    }<\/strong>\r\n}<\/pre>\n<p>\u306a\u304a\u3001\u3053\u306e\u4e2d\u306e<code>broadcastWith()<\/code>\u306e\u8fd4\u308a\u5024\u304c<code>JavaScript<\/code>\u5074\u3078\u9001\u4fe1\u3055\u308c\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h1>\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3092\u6e96\u5099\u3059\u308b<\/h1>\n<p>\u3067\u306f\u3001\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3067\u3059\u3002<br \/>\n\u4e2d\u8eab\u306f\u3053\u3046\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><strong>app\/Http\/Controllers\/JointDocumentController.php<\/strong><\/p>\n<pre>&lt;?php\r\n\r\nnamespace App\\Http\\Controllers;\r\n\r\nuse App\\Events\\JointDocumentUpdated;\r\nuse App\\Models\\JointDocument;\r\nuse Illuminate\\Http\\Request;\r\n\r\nclass JointDocumentController extends Controller\r\n{\r\n    <strong>public function edit(JointDocument $joint_document)<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        return view('joint_document.edit')-&gt;with([<\/strong>\r\n<strong>            'joint_document' =&gt; $joint_document,<\/strong>\r\n<strong>        ]);<\/strong>\r\n<strong>    }<\/strong>\r\n\r\n<strong>    public function update(Request $request, JointDocument $joint_document)<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        \/\/ \u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u306f\u7701\u7565\u3057\u3066\u3044\u307e\u3059<\/strong>\r\n\r\n<strong>        $result = false;<\/strong>\r\n<strong>        $version = $request-&gt;version;<\/strong>\r\n\r\n<strong>        if(intval($version) === intval($joint_document-&gt;version)) { \/\/ \u6700\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u304b\u3069\u3046\u304b\u30c1\u30a7\u30c3\u30af<\/strong>\r\n\r\n<strong>            $joint_document-&gt;body = $request-&gt;body;<\/strong>\r\n<strong>            $result = $joint_document-&gt;save();<\/strong>\r\n\r\n<strong>            if($result === true) {<\/strong>\r\n\r\n<strong>                JointDocumentUpdated::dispatch($joint_document); \/\/ Pusher \u3078\u30a4\u30d9\u30f3\u30c8\u3092\u9001\u308b<\/strong>\r\n\r\n<strong>            }<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n\r\n<strong>        if($result === false) { \/\/ \u5931\u6557\u306e\u5834\u5408\u306f\u6700\u65b0\u7248\u306e\u30c7\u30fc\u30bf\u3092\u8fd4\u3059<\/strong>\r\n\r\n<strong>            $joint_document = $joint_document-&gt;refresh();<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n\r\n<strong>        return [<\/strong>\r\n<strong>            'result' =&gt; $result,<\/strong>\r\n<strong>            'latest_joint_document' =&gt; $joint_document<\/strong>\r\n<strong>        ];<\/strong>\r\n<strong>    }<\/strong>\r\n}<\/pre>\n<p>\u3053\u306e\u4e2d\u3067\u91cd\u8981\u306a\u306e\u306f\u3001\u300c<strong>\u7de8\u96c6\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u308b\u6587\u66f8\u304c\u6700\u65b0\u7248\u304b\u3069\u3046\u304b<\/strong>\u300d\u306e\u30c1\u30a7\u30c3\u30af\u3067\u3059\u3002<\/p>\n<p>\u306a\u305c\u306a\u3089\u3001\u30d0\u30fc\u30b8\u30e7\u30f3\u30fb\u30c1\u30a7\u30c3\u30af\u3092\u3057\u306a\u3044\u3068\u300c<strong>\u53e4\u3044\u6587\u66f8\u306a\u306e\u306b\u7de8\u96c6\u3057\u3066\u3057\u307e\u3046 \uff1d \u8ab0\u304b\u306e\u52aa\u529b\u304c\u6d88\u3048\u3066\u3057\u307e\u3046<\/strong>\u300d\u53ef\u80fd\u6027\u304c\u3042\u308b\u304b\u3089\u3067\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30b1\u30fc\u30b9\u3067\u3059\u3002<\/p>\n<ol>\n<li>A \u3055\u3093\u304c\uff11\u6642\u9593\u9811\u5f35\u3063\u3066\u30ec\u30dd\u30fc\u30c8\u3092\u66f8\u304d\u4fdd\u5b58\u3002\u305d\u3057\u3066\u3001\u30d1\u30bd\u30b3\u30f3\u3092\u30b9\u30ea\u30fc\u30d7\u72b6\u614b\u306b\u3057\u305f<\/li>\n<li>\u76f4\u5f8c\u306bB\u3055\u3093\u304c\u300cA\u3055\u3093\u306e\u30ec\u30dd\u30fc\u30c8\u300d\u3092\uff13\u6642\u9593\u6c17\u5408\u3067\u4fee\u6b63\u3057\u305f<\/li>\n<li>\u305d\u306e\u5f8c\u3001A\u3055\u3093\u304c\u5bdd\u308b\u524d\u306b\u300c\u3042\uff01\u3042\u308c\u66f8\u304d\u5fd8\u308c\u305f\u300d\u3068\u30b9\u30ea\u30fc\u30d7\u72b6\u614b\u304b\u3089\u30d1\u30bd\u30b3\u30f3\u3092\u5fa9\u6d3b\u3055\u305b\u3066\u6587\u7ae0\u3092\u8ffd\u52a0\u3057\u305f<\/li>\n<li>\u7d50\u679c\u3001B\u3055\u3093\u306e\u6c17\u5408\u306e\uff13\u6642\u9593\u306f\u5931\u308f\u308c\u3066\u3057\u307e\u3063\u305f&#8230;\ud83d\ude2b<\/li>\n<\/ol>\n<p>\u3064\u307e\u308a\u3001\u53e4\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u304b\u3089\u5909\u66f4\u3092\u3057\u3088\u3046\u3068\u3059\u308b\u3068\u62d2\u5426\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u308f\u3051\u3067\u3059\u306d\u3002\u3053\u306e\u7406\u7531\u304b\u3089\u6700\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u3057\u304b\u66f4\u65b0\u3067\u304d\u306a\u304f\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u203b \u672c\u6765\u306f<code>setInterval()<\/code> \u3092\u4f7f\u3063\u3066\u5b9a\u671f\u7684\u306b\u6700\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u304b\u3069\u3046\u304b\u30c1\u30a7\u30c3\u30af\u3059\u308b\u306a\u3069\u3001\u4f55\u91cd\u306b\u3082\u30c1\u30a7\u30c3\u30af\u3092\u3044\u308c\u3066\u304a\u304f\u3079\u304d\u3067\u3059\u304c\u3001\u4eca\u56de\u306f\u300c\u30b7\u30f3\u30d7\u30eb\u69cb\u9020\u300d\u3067\u304a\u5c4a\u3051\u3057\u3066\u3044\u308b\u306e\u3067\u3001\u7701\u7565\u3057\u3066\u3044\u307e\u3059\u3002\u307e\u305f\u3001\u5404\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u6b8b\u3059\u6a5f\u80fd\u3082\u3042\u308b\u3068\u3044\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n<h1>\u30d3\u30e5\u30fc\u3092\u6e96\u5099\u3059\u308b<\/h1>\n<p>\u3067\u306f\u3001\u30d6\u30e9\u30a6\u30b6\u3067\u8868\u793a\u3055\u308c\u308b\u3053\u3068\u306b\u306a\u308b\u30d3\u30e5\u30fc\u3092\u3064\u304f\u308a\u307e\u3059\u3002<\/p>\n<p><strong>resources\/views\/joint_document\/edit.blade.php<\/strong><\/p>\n<pre>&lt;html&gt;\r\n&lt;head&gt;\r\n    <strong>&lt;!-- \u2460 Pusher \u7528\u8a8d\u8a3c\u7528\u306b csrf \u30c8\u30fc\u30af\u30f3\u3092\u30bb\u30c3\u30c8 --&gt;<\/strong>\r\n<strong>    &lt;meta name=\"csrf-token\" content=\"{{ csrf_token() }}\"&gt;<\/strong>\r\n    &lt;link href=\"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@5.0.1\/dist\/css\/bootstrap.min.css\" rel=\"stylesheet\"&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;div id=\"app\" class=\"p-5\"&gt;\r\n    &lt;div class=\"row\"&gt;\r\n        &lt;div class=\"col-md-6\"&gt;\r\n            &lt;div class=\"h3 mb-3\"&gt;\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u5171\u540c\u7de8\u96c6\u306e\u30b5\u30f3\u30d7\u30eb&lt;\/div&gt;\r\n            &lt;textarea class=\"form-control mb-3 p-4\" rows=\"15\" v-model=\"params.body\"&gt;&lt;\/textarea&gt;\r\n            &lt;div class=\"text-end\"&gt;\r\n                &lt;button class=\"btn btn-primary btn-lg\" @click=\"onSubmit\"&gt;\u4fdd\u5b58\u3059\u308b&lt;\/button&gt;\r\n            &lt;\/div&gt;\r\n        &lt;\/div&gt;\r\n    &lt;\/div&gt;\r\n    &lt;div class=\"row\"&gt;\r\n        &lt;div class=\"col-md-6\"&gt;\r\n            \u30d0\u30fc\u30b8\u30e7\u30f3\uff08\u30c6\u30b9\u30c8\u7528\uff09&lt;br&gt;\r\n            &lt;input type=\"text\" v-model=\"params.version\"&gt;\r\n        &lt;\/div&gt;\r\n    &lt;\/div&gt;\r\n&lt;\/div&gt;\r\n&lt;!-- \u2193\u2193\u2193 Laravel Echo\u30fbVue\u30fbaxios \u306f npm \u3067\u30d3\u30eb\u30c9\u3057\u3066\u56fa\u3081\u3066\u3044\u307e\u3059 --&gt;\r\n&lt;script src=\"\/js\/app.js\"&gt;&lt;\/script&gt;\r\n&lt;script&gt;\r\n\r\n    createApp({\r\n        data() {\r\n            return {\r\n                params: @json($joint_document-&gt;only(['version', 'body']))\r\n            }\r\n        },\r\n        methods: {\r\n            init() {\r\n\r\n                <strong>\/\/ \u2461 Pusher \u304b\u3089\u306e\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u901a\u77e5\u3092\u53d7\u3051\u53d6\u308b\u90e8\u5206<\/strong>\r\n<strong>                Echo.private('joint-document-updated.{{ $joint_document-&gt;id }}')<\/strong>\r\n<strong>                    .listen('JointDocumentUpdated', e =&gt; {<\/strong>\r\n\r\n<strong>                        this.params = {<\/strong>\r\n<strong>                            version: e.joint_document.version,<\/strong>\r\n<strong>                            body: e.joint_document.body<\/strong>\r\n<strong>                        };<\/strong>\r\n\r\n<strong>                    });<\/strong>\r\n\r\n            },\r\n            onSubmit() {\r\n\r\n                const url = '{{ route('joint_document.update', $joint_document-&gt;id) }}';\r\n                axios.put(url, this.params)\r\n                    .then(response =&gt; {\r\n\r\n                        const result = response.data.result;\r\n\r\n                        <strong>if(result === false) { \/\/ \u2462 \u4fdd\u5b58\u306b\u5931\u6557\u3057\u305f\u3068\u304d\u306f\u6700\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u3078\u66f4\u65b0<\/strong>\r\n\r\n<strong>                            const joint_document = response.data.latest_joint_document;<\/strong>\r\n<strong>                            this.params = {<\/strong>\r\n<strong>                                version: joint_document.version,<\/strong>\r\n<strong>                                body: joint_document.body<\/strong>\r\n<strong>                            };<\/strong>\r\n\r\n<strong>                        }<\/strong>\r\n\r\n                    });\r\n\r\n            }\r\n        },\r\n        mounted() {\r\n\r\n            this.init();\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>\u3067\u306f\u3001\u3053\u306e\u4e2d\u3067\u91cd\u8981\u306a\u90e8\u5206\u3092\u3072\u3068\u3064\u305a\u3064\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u2757<\/p>\n<h2>\u2460 Pusher \u7528\u8a8d\u8a3c\u7528\u306b csrf \u30c8\u30fc\u30af\u30f3\u3092\u30bb\u30c3\u30c8<\/h2>\n<p>\u4eca\u56de<code>Pusher<\/code>\u3067\u4f7f\u3046\u306e\u306f\u300c\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u300d\u306a\u63a5\u7d9a\u3067\u3059\u306e\u3067\u3001\u30da\u30fc\u30b8\u304c\u958b\u3044\u305f\u6642\u306b\u8a8d\u8a3cURL\uff08 <code>https:\/\/******\/broadcasting\/auth<\/code> \uff09\u304b\u3089\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3059\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3057\u304b\u3057\u3001<code>Laravel<\/code>\u306b\u306f\u6a19\u6e96\u3067<code>CSRF<\/code>\u30c1\u30a7\u30c3\u30af\u304c\u3042\u308b\u306e\u3067\u3001\u3082\u3057\u30c8\u30fc\u30af\u30f3\u304c\u306a\u3044\u5834\u5408\u306f<code>419<\/code>\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3059\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002\u305d\u306e\u5bfe\u51e6\u306e\u305f\u3081\u306b\u30bb\u30c3\u30c8\u3057\u3066\u3044\u308b\u308f\u3051\u3067\u3059\u306d\u3002\uff08\u306a\u304a\u3001\u304a\u305d\u3089\u304f<code>layouts<\/code>\u306e<code>Blade<\/code>\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306b\u306f\u3059\u3067\u306b\u30bb\u30c3\u30c8\u3055\u308c\u3066\u3044\u307e\u3059\uff09<\/p>\n<h2>\u2461 Pusher \u304b\u3089\u306e\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u901a\u77e5\u3092\u53d7\u3051\u53d6\u308b\u90e8\u5206<\/h2>\n<p>\u3053\u3053\u304c<code>Pusher<\/code>\u304b\u3089\u306e\u901a\u77e5\u3092\u53d7\u3051\u53d6\u308b\u90e8\u5206\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u53d6\u5f97\u3067\u304d\u308b\u30c7\u30fc\u30bf\u306f\u3001<code>JointDocumentUpdated<\/code>\u30a4\u30d9\u30f3\u30c8\u306e<code>broadcastWith()<\/code>\u3067\u30bb\u30c3\u30c8\u3055\u308c\u305f\u3082\u306e\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>\u2462 \u4fdd\u5b58\u306b\u5931\u6557\u3057\u305f\u3068\u304d\u306f\u6700\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u3078\u66f4\u65b0<\/h2>\n<p>\u3053\u3053\u304c\u5148\u307b\u3069\u7d39\u4ecb\u3057\u305f\u300c<strong>\u6700\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u3057\u304b\u66f4\u65b0\u3067\u304d\u306a\u3044\u3088\u3046\u306b\u3059\u308b<\/strong>\u300d\u90e8\u5206\u306b\u95a2\u9023\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3064\u307e\u308a\u3001<code>Laravel<\/code>\u5074\u3067\u300c<strong>\u3044\u3084\u3044\u3084\u3001\u3053\u308c\u53e4\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u3060\u304b\u3089\u66f4\u65b0\u3055\u305b\u306a\u3044\u3088\ud83d\ude24<\/strong>\u300d\u3068\u306a\u3063\u305f\u5834\u5408\u306b\u3001\u305d\u306e\u53e4\u3044\u30c7\u30fc\u30bf\u306e\u4ee3\u308f\u308a\u306b\u6700\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u3078\u7f6e\u304d\u63db\u3048\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002\uff08\u305d\u3057\u3066\u3001\u6b21\u56de\u304b\u3089\u306f\u6700\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u306a\u306e\u3067\u66f4\u65b0\u3067\u304d\u308b\u3001\u3068\u3044\u3046\u6d41\u308c\u3067\u3059\uff09<\/p>\n<p>\u203b \u306a\u304a\u3001\u4eca\u56de\u306f\u30c6\u30b9\u30c8\u306e\u305f\u3081\u30d0\u30fc\u30b8\u30e7\u30f3\u756a\u53f7\u3092\u3044\u3064\u3067\u3082\u5909\u66f4\u3067\u304d\u308b\u5165\u529b\u30dc\u30c3\u30af\u30b9\u3082\u3064\u3051\u3066\u3044\u307e\u3059\u3002<\/p>\n<h1>\u30eb\u30fc\u30c8\u3092\u6e96\u5099\u3059\u308b<\/h1>\n<p>\u3067\u306f\u3001\u6700\u5f8c\u306b\u30eb\u30fc\u30c8\u3092\u4f5c\u308a\u307e\u3059\u3002<\/p>\n<p><strong>routes\/web.php<\/strong><\/p>\n<pre><strong>use App\\Http\\Controllers\\JointDocumentController;<\/strong>\r\n\r\n\/\/ \u7701\u7565\r\n\r\n\/\/ \u5171\u540c\u7de8\u96c6\r\n<strong>Route::resource('joint_document', JointDocumentController::class)-&gt;only(['edit', 'update']);<\/strong>\r\n\r\n\/\/ Pusher \u8a8d\u8a3c\r\n<strong>Route::post('broadcasting\/auth', function(){<\/strong>\r\n\r\n<strong>    $pusher = new \\Pusher\\Pusher(<\/strong>\r\n<strong>        config('broadcasting.connections.pusher.key'),<\/strong>\r\n<strong>        config('broadcasting.connections.pusher.secret'),<\/strong>\r\n<strong>        config('broadcasting.connections.pusher.app_id'),<\/strong>\r\n<strong>    );<\/strong>\r\n<strong>    $request = request();<\/strong>\r\n<strong>    $channel_name = $request-&gt;channel_name;<\/strong>\r\n<strong>    $socket_id = $request-&gt;socket_id;<\/strong>\r\n\r\n<strong>    return $pusher-&gt;socket_auth($channel_name, $socket_id);<\/strong>\r\n\r\n<strong>});<\/strong><\/pre>\n<p>\u3053\u306e\u4e2d\u3067\u91cd\u8981\u306a\u306e\u304c<code>broadcasting\/auth<\/code>\u306e\u90e8\u5206\u3067\u3059\u3002<\/p>\n<p>\u3053\u3053\u306b<code>JavaScript<\/code>\u5074\u304b\u3089\u30a2\u30af\u30bb\u30b9\u304c\u3042\u308a\u3001\u8a8d\u8a3c\u30c8\u30fc\u30af\u30f3\u3092\u53d6\u5f97\u3059\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\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>\uff12\u3064\u306e\u30d6\u30e9\u30a6\u30b6\u3067\u300c<strong>https:\/\/******\/joint_document<\/strong>\u300d\u3078\u305d\u308c\u305e\u308c\u30a2\u30af\u30bb\u30b9\u3057\u3066\u307f\u307e\u3059\u3002\uff08<code>Chrome<\/code>\u306e\u5834\u5408\u3001\u30b7\u30fc\u30af\u30ec\u30c3\u30c8\u30e2\u30fc\u30c9\u3067\u958b\u304f\u3068\u5225\u30d6\u30e9\u30a6\u30b6\u3068\u3057\u3066\u4f7f\u3048\u307e\u3059\uff09<\/p>\n<p>\u3059\u308b\u3068\u3001DB\u5185\u306e\u6587\u7ae0\u304c\u8868\u793a\u3055\u308c\u3001\u3055\u3089\u306b\u30d0\u30fc\u30b8\u30e7\u30f3\u306f<code>1<\/code>\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9894\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/12\/laravel_coedit_2.png\" alt=\"\" width=\"640\" height=\"367\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/12\/laravel_coedit_2.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/12\/laravel_coedit_2-300x172.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u3067\u306f\u3001\u307e\u305a\u306f\u5de6\u5074\u304b\u3089\u300c<strong>\u5de6\u304b\u3089\u306e\u9001\u4fe1\u3067\u3059\uff01<\/strong>\u300d\u3068\u5165\u529b\u3057\u4fdd\u5b58\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9893\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/12\/laravel_coedit_3.png\" alt=\"\" width=\"640\" height=\"369\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/12\/laravel_coedit_3.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/12\/laravel_coedit_3-300x173.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-9892\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/12\/laravel_coedit_4.png\" alt=\"\" width=\"640\" height=\"370\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/12\/laravel_coedit_4.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/12\/laravel_coedit_4-300x173.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\u53f3\u5074\u306e\u30d6\u30e9\u30a6\u30b6\u306e\u6587\u7ae0\u304c\u81ea\u52d5\u7684\u306b\u66f4\u65b0\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<p>\uff08\u3055\u3089\u306b\u3001\u30d0\u30fc\u30b8\u30e7\u30f3\u304c<code>2<\/code>\u306b\u306a\u3063\u3066\u3044\u308b\u3053\u3068\u3082\u6ce8\u76ee\u3057\u3066\u304f\u3060\u3055\u3044\ud83d\udc4d\uff09<\/p>\n<p>\u3067\u306f\u3001\u7d9a\u3044\u3066\u53f3\u5074\u304b\u3089\u540c\u3058\u304f\u300c<strong>\u53f3\u304b\u3089\u306e\u9001\u4fe1\u3067\u3059\u266a<\/strong>\u300d\u3068\u5165\u529b\u3057\u3001\u4fdd\u5b58\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9891\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/12\/laravel_coedit_5.png\" alt=\"\" width=\"640\" height=\"366\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/12\/laravel_coedit_5.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/12\/laravel_coedit_5-300x172.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u7d50\u679c\u306f\u3069\u3046\u306a\u3063\u305f\u3067\u3057\u3087\u3046\u304b\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb\uff1f\uff1f<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9890\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/12\/laravel_coedit_6.png\" alt=\"\" width=\"640\" height=\"362\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/12\/laravel_coedit_6.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/12\/laravel_coedit_6-300x170.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\u5de6\u5074\u306b\u3082\u5909\u66f4\u304c\u901a\u77e5\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<p>\u3067\u306f\u3001\u6700\u5f8c\u306b\u300c<strong>\u53e4\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u304b\u3089\u306e\u4fdd\u5b58\u3092\u60f3\u5b9a\u3057\u305f\u30c6\u30b9\u30c8<\/strong>\u300d\u3092\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u307e\u305a\u3001\u5de6\u5074\u306b\u300c<strong>\u53e4\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u304b\u3089\u66f4\u65b0\u3059\u308b\u30c6\u30b9\u30c8\u3067\u3059\u3002<\/strong>\u300d\u3068\u5165\u529b\u3057\u3001\u3055\u3089\u306b\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u300c<strong>\uff11<\/strong>\u300d\u306b\u5909\u66f4\u3057\u3066\u9001\u4fe1\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9889\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/12\/laravel_coedit_7.png\" alt=\"\" width=\"640\" height=\"362\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/12\/laravel_coedit_7.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/12\/laravel_coedit_7-300x170.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u3059\u308b\u3068\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb\uff1f\uff1f\uff1f<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9888\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/12\/laravel_coedit_8.png\" alt=\"\" width=\"640\" height=\"363\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/12\/laravel_coedit_8.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/12\/laravel_coedit_8-300x170.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\u60f3\u5b9a\u3057\u305f\u3068\u304a\u308a\u3001\u53e4\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u306a\u306e\u3067\u4fdd\u5b58\u304c\u62d2\u5426\u3055\u308c\u3001\u3055\u3089\u306b\u6587\u7ae0\uff06\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u6700\u65b0\u306e\u3082\u306e\u306b\u5165\u308c\u66ff\u3048\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u3059\u3079\u3066\u6210\u529f\u3067\u3059\ud83d\ude04\u2728<\/p>\n<h1>\u4f01\u696d\u69d8\u3078\u306e\u3054\u63d0\u6848<\/h1>\n<p>\u4eca\u56de\u306e\u6a5f\u80fd\u3092\u4f7f\u3046\u3068\u3001\u4eca\u3054\u5229\u7528\u4e2d\u306e\u30b7\u30b9\u30c6\u30e0\u3067\u3082\u300c<strong>\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u5171\u540c\u7de8\u96c6<\/strong>\u300d\u6a5f\u80fd\u304c\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3055\u3089\u306b\u3001\u6587\u7ae0\u3060\u3051\u3067\u306a\u304f\u3042\u308b\u30c6\u30fc\u30d6\u30eb\u5185\u306e\u30c7\u30fc\u30bf\u30ea\u30b9\u30c8\u3084\u3001\u3084\u308a\u304b\u305f\u306b\u3088\u3063\u3066\u306f\u753b\u50cf\u306e\u5171\u540c\u7de8\u96c6\u306a\u3069\u3082\u53ef\u80fd\u306b\u306a\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u3046\u3044\u3063\u305f\u6a5f\u80fd\u3092\u3054\u5e0c\u671b\u3067\u3057\u305f\u3089\u3001\u305c\u3072\u304a\u554f\u3044\u5408\u308f\u305b\u304b\u3089\u304a\u6c17\u8efd\u306b\u3054\u9023\u7d61\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u3069\u3046\u305e\u3088\u308d\u3057\u304f\u304a\u9858\u3044\u3044\u305f\u3057\u307e\u3059\u3002m(_ _)m<\/p>\n<h1>\u304a\u308f\u308a\u306b<\/h1>\n<p>\u3068\u3046\u3053\u3068\u3067\u3001\u4eca\u56de\u306f<code>Laravel + Pusher<\/code>\u3067\u300c<strong>\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u5171\u540c\u7de8\u96c6<\/strong>\u300d\u6a5f\u80fd\u3092\u3064\u304f\u3063\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u5f53\u521d\u306f\u3001\u5909\u66f4\u3055\u308c\u305f\u90e8\u5206\u3060\u3051\u3092\u66f4\u65b0\u3059\u308b\u3064\u3082\u308a\u3060\u3063\u305f\u306e\u3067\u3059\u304c\u3001\u6642\u9593\u5dee\u306e\u3053\u3068\u3092\u8003\u3048\u308b\u3068\u3069\u3046\u3057\u3066\u3082\u30b3\u30f3\u30d5\u30ea\u30af\u30c8\u3057\u3066\u3057\u307e\u3046\u306e\u3067\u3001\u4eca\u56de\u306e\u3088\u3046\u306a\u5f62\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u3061\u306a\u307f\u306b\u4eca\u56de\u306f\u5909\u66f4\u7b87\u6240\u304c\uff11\u304b\u6240\u3060\u3051\u3067\u3057\u305f\u304c\u3001\u30a8\u30af\u30bb\u30eb\u306e\u3088\u3046\u306b\u5206\u5272\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u306f\u3088\u308a\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u6027\u304c\u5f37\u3044\u30b7\u30b9\u30c6\u30e0\u304c\u3064\u304f\u308c\u308b\u3093\u3058\u3083\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<p>\u307e\u305f\u3001\u76f8\u624b\u5074\u304c\u5165\u529b\u3057\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u3082<code>Pusher<\/code>\u3067\u901a\u77e5\u3067\u304d\u308b\u306e\u3067\u30e6\u30fc\u30b6\u30d3\u30ea\u30c6\u30a3\u3092\u8003\u3048\u308b\u306a\u3089\u305d\u3046\u3044\u3063\u305f\u300c\u3061\u3087\u3063\u3068\u3057\u305f\u300d\u6a5f\u80fd\u3092\u8ffd\u52a0\u3057\u3066\u65b9\u304c\u3044\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u306d\u3002<\/p>\n<p>\u305c\u3072\u7686\u3055\u3093\u3082\u3044\u308d\u3044\u308d\u3068\u6539\u9020\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\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-3405 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/04\/no_18.png\" alt=\"\" width=\"310\" height=\"320\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/04\/no_18.png 310w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/04\/no_18-291x300.png 291w\" sizes=\"auto, (max-width: 310px) 100vw, 310px\" \/><span style=\"font-size: 1rem;\">\u300c\u3082\u306f\u3084\u30d6\u30ed\u30b0\u66f8\u304f\u3068\u304d\u3082<br \/>\n<\/span><code>Copilot<\/code>\u304c\u6b32\u3057\u3044\u3067\u3059\uff08\u7b11\uff09\u300d<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u5148\u65e5 paiza \u304c\u300c\u7dca\u6025\u4e8b\u614b\u5ba3\u8a00\u89e3\u9664\u5f8c\u306eIT\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u30ea\u30e2\u30fc\u30c8\u30ef\u30fc\u30af\u5b9f\u614b\u8abf\u67fb\u300d\u3068\u3044\u3046\u30a2\u30f3\u30b1\u30fc\u30c8\u7d50\u679c\u3092\u516c\u958b\u3057\u307e\u3057\u305f\u3002 \u3053\u306e\u4e2d\u3067\u79c1\u304c\u8208\u5473\u6df1\u304b\u3063\u305f\u306e\u304c\u3001 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.capilano-fw.com\/?p=9881\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;\u3010Laravel + Pusher\u3011\u307f\u3093\u306a\u3067\u5171\u540c\u7de8\u96c6\u3067\u304d\u308b\u6a5f\u80fd\u3092\u3064\u304f\u308b&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":9897,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[229],"class_list":["post-9881","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-laravel","tag-pusher"],"_links":{"self":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/9881","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=9881"}],"version-history":[{"count":8,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/9881\/revisions"}],"predecessor-version":[{"id":9898,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/9881\/revisions\/9898"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/media\/9897"}],"wp:attachment":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9881"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9881"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9881"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}