{"id":10816,"date":"2022-08-15T07:00:59","date_gmt":"2022-08-14T22:00:59","guid":{"rendered":"https:\/\/blog.capilano-fw.com\/?p=10816"},"modified":"2022-08-03T13:44:23","modified_gmt":"2022-08-03T04:44:23","slug":"laravel-%e3%81%a7%e5%9f%8b%e3%82%81%e8%be%bc%e3%81%bf-youtube-%e3%81%ae%e6%93%8d%e4%bd%9c%e5%b1%a5%e6%ad%b4%e3%82%92%e4%bf%9d%e5%ad%98%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/blog.capilano-fw.com\/?p=10816","title":{"rendered":"Laravel \u3067\u57cb\u3081\u8fbc\u307f YouTube \u306e\u64cd\u4f5c\u5c65\u6b74\u3092\u4fdd\u5b58\u3059\u308b"},"content":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u3053\u306e\u30d6\u30ed\u30b0\u3067\u306f\u3044\u308d\u3044\u308d\u306a\u5206\u91ce\u306e\u8a18\u4e8b\u3092\u516c\u958b\u3057\u3066\u304d\u307e\u3057\u305f\u304c\u3001\u305d\u306e\u7406\u7531\u306e\u3072\u3068\u3064\u3068\u3057\u3066\u3001\u300c<strong>\u958b\u767a\u8005\u3060\u3051\u3067\u306a\u304f\u3001\u7d4c\u55b6\u8005\u30b5\u30a4\u30c9\u306b\u5411\u3051\u3066<\/strong>\u300d\u60c5\u5831\u767a\u4fe1\u304c\u3057\u305f\u3044\u3068\u3044\u3046\u3082\u306e\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001\u305d\u3093\u306a\u30d3\u30b8\u30cd\u30b9\u7684\u306a\u8996\u70b9\u3067\u8003\u3048\u305f\u6642\u306b\u3072\u3068\u3064\u8a18\u4e8b\u306b\u3057\u3066\u307f\u305f\u3044\u3068\u601d\u3046\u30a2\u30a4\u30c7\u30a2\u304c\u6d6e\u304b\u3093\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u308c\u306f\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p><strong style=\"font-size: 35px;\">YouTube \u52d5\u753b\u306e\u884c\u52d5\u5c65\u6b74\u3092\u4fdd\u5b58\u3059\u308b<\/strong><\/p>\n<p>\u3068\u3044\u3046\u3082\u306e\u3067\u3059\u3002<\/p>\n<p>\u3064\u307e\u308a\u3001\u52d5\u753b\u306e\u300c<strong>\u3069\u3053\u304c\u98db\u3070\u3055\u308c\u3066\u3044\u3066<\/strong>\u300d\u300c<strong>\u3069\u3053\u304c\u3088\u304f\u898b\u3089\u308c\u3066\u3044\u308b\u304b<\/strong>\u300d\u3092\u77e5\u308b\u3053\u3068\u3067\u3001\u305d\u306e\u52d5\u753b\u306e\u826f\u3057\u60aa\u3057\u3092\u5224\u65ad\u3059\u308b\u3053\u3068\u304c\u72d9\u3044\u3067\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u30db\u30f3\u30c8\u306b\u300c<strong>\u3061\u3083\u3093\u3068\u6700\u5f8c\u307e\u3067\u8996\u8074\u3055\u308c\u3066\u3044\u308b\u306e\u304b<\/strong>\u300d\u3068\u3044\u3046\u30c7\u30fc\u30bf\u3082\u91cd\u8981\u3067\u3059\u3088\u306d\u3002<\/p>\n<p>\u305d\u3053\u3067\u2757<\/p>\n<p>\u4eca\u56de\u306f<code>Laravel<\/code>\u3092\u4f7f\u3063\u3066\u3001<code>YouTube<\/code>\u52d5\u753b\u306e\u884c\u52d5\u5c65\u6b74\u3092\u4fdd\u5b58\u3067\u304d\u308b\u3088\u3046\u306b\u3057\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\ude0a\u2728<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-6070 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/03\/no_5.png\" alt=\"\" width=\"260\" height=\"320\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/03\/no_5.png 260w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/03\/no_5-244x300.png 244w\" sizes=\"auto, (max-width: 260px) 100vw, 260px\" \/>\u300c\u65b0\u3057\u3044\u8a66\u307f\u3068\u3057\u3066\u3001<code>Vue<\/code>\u306f\u4f7f\u308f\u305a\u3001<br \/>\n\u30d4\u30e5\u30a2\u306a<code>JavaScript<\/code>\u3067\u66f8\u3044\u3066\u307f\u307e\u3057\u305f\u300d<\/p>\n<p><strong>\u958b\u767a\u74b0\u5883\uff1a<\/strong> Laravel 9.x<\/p>\n<h1>\u5fc5\u8981\u306a\u30d5\u30a1\u30a4\u30eb\u3092\u3064\u304f\u308b<\/h1>\n<p>\u3067\u306f\u3001\u307e\u305a\u306f<code>Laravel<\/code>\u306b\u5fc5\u8981\u306a\u30d5\u30a1\u30a4\u30eb\u3092\u3064\u304f\u3063\u3066\u3044\u304d\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 YoutubeAction -mc<\/strong><\/pre>\n<pre><strong>php artisan make:model YoutubeActionDetail -m<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u3001\u300c\u30e2\u30c7\u30eb\u00d7\uff12\u300d\u3068\u300c\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u00d7\uff12\u300d\u3068\u300c\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u00d7\uff11\u300d\u306e<strong>\u5408\u8a08\uff13\u30d5\u30a1\u30a4\u30eb<\/strong>\u304c\u4f5c\u6210\u3055\u308c\u308b\u306e\u3067\u3001\u305d\u308c\u305e\u308c\u4e2d\u8eab\u3092\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2>\u30e2\u30c7\u30eb<\/h2>\n<p>\u3067\u306f\u3001\u30e2\u30c7\u30eb\u304b\u3089\u3067\u3059\u3002<\/p>\n<p><strong>app\/Models\/YoutubeAction.php<\/strong><\/p>\n<pre><strong>&lt;?php<\/strong>\r\n\r\n<strong>namespace App\\Models;<\/strong>\r\n\r\n<strong>use Illuminate\\Database\\Eloquent\\Factories\\HasFactory;<\/strong>\r\n<strong>use Illuminate\\Database\\Eloquent\\Model;<\/strong>\r\n\r\n<strong>class YoutubeAction extends Model<\/strong>\r\n<strong>{<\/strong>\r\n<strong>    use HasFactory;<\/strong>\r\n\r\n<strong>    \/\/ Relationship<\/strong>\r\n<strong>    public function details()<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        return $this-&gt;hasMany(YoutubeActionDetail::class, 'youtube_action_id', 'id');<\/strong>\r\n<strong>    }<\/strong>\r\n<strong>}<\/strong><\/pre>\n<p>\u3053\u306e\u4e2d\u3067\u306f\u3001<code>youtube_action_details<\/code>\u30c6\u30fc\u30d6\u30eb\u3068\u306e\u300c<strong>\uff11\uff1a\u591a<\/strong>\u300d\u306e\u30ea\u30ec\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><strong>app\/Models\/YoutubeActionDetail.php<\/strong><\/p>\n<pre><strong>&lt;?php<\/strong>\r\n\r\n<strong>namespace App\\Models;<\/strong>\r\n\r\n<strong>use Illuminate\\Database\\Eloquent\\Factories\\HasFactory;<\/strong>\r\n<strong>use Illuminate\\Database\\Eloquent\\Model;<\/strong>\r\n\r\n<strong>class YoutubeActionDetail extends Model<\/strong>\r\n<strong>{<\/strong>\r\n<strong>    use HasFactory;<\/strong>\r\n\r\n<strong>    \/\/ Constants<\/strong>\r\n<strong>    const TYPES = [<\/strong>\r\n<strong>        'ended' =&gt; '\u7d42\u4e86',<\/strong>\r\n<strong>        'playing' =&gt; '\u518d\u751f',<\/strong>\r\n<strong>        'paused' =&gt; '\u4e00\u6642\u505c\u6b62',<\/strong>\r\n<strong>        'leave' =&gt; '\u96e2\u8131',<\/strong>\r\n<strong>    ];<\/strong>\r\n\r\n<strong>    \/\/ Accessor<\/strong>\r\n<strong>    public function getReadableTimeAttribute()<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        return gmdate('H:i:s', $this-&gt;time);<\/strong>\r\n<strong>    }<\/strong>\r\n\r\n<strong>    public function getReadableTypeAttribute()<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        return data_get(self::TYPES, $this-&gt;type);<\/strong>\r\n<strong>    }<\/strong>\r\n<strong>}<\/strong><\/pre>\n<p>\u3053\u3053\u3067\u306f\u3001\u8868\u793a\u306b\u95a2\u3059\u308b<code>Accessor<\/code>\u3092\u8ffd\u52a0\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2>\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3<\/h2>\n<p><strong>database\/migrations\/****_**_**_******_create_youtube_actions_table.php<\/strong><\/p>\n<pre>\/\/ \u7701\u7565\r\n\r\npublic function up()\r\n{\r\n    <strong>Schema::create('youtube_actions', function (Blueprint $table) {<\/strong>\r\n<strong>        $table-&gt;id();<\/strong>\r\n<strong>        $table-&gt;string('video_id')-&gt;comment('\u52d5\u753bID');<\/strong>\r\n<strong>        $table-&gt;ipAddress('ip')-&gt;comment('IP\u30a2\u30c9\u30ec\u30b9');<\/strong>\r\n<strong>        $table-&gt;timestamps();<\/strong>\r\n<strong>    });<\/strong>\r\n}\r\n\r\n\/\/ \u7701\u7565<\/pre>\n<p><strong>database\/migrations\/****_**_**_******_create_youtube_action_details_table.php<\/strong><\/p>\n<pre>\/\/ \u7701\u7565\r\n\r\npublic function up()\r\n{\r\n    <strong>Schema::create('youtube_action_details', function (Blueprint $table) {<\/strong>\r\n<strong>        $table-&gt;id();<\/strong>\r\n<strong>        $table-&gt;unsignedBigInteger('youtube_action_id')-&gt;comment('\u89aa\u30c6\u30fc\u30d6\u30ebID');<\/strong>\r\n<strong>        $table-&gt;string('type')-&gt;comment('\u64cd\u4f5c\u30bf\u30a4\u30d7');<\/strong>\r\n<strong>        $table-&gt;integer('time')-&gt;comment('\u518d\u751f\u4f4d\u7f6e\uff08\u79d2\uff09');<\/strong>\r\n<strong>        $table-&gt;timestamps();<\/strong>\r\n\r\n<strong>        $table-&gt;foreign('youtube_action_id')-&gt;references('id')-&gt;on('youtube_actions')-&gt;onDelete('cascade');<\/strong>\r\n<strong>    });<\/strong>\r\n}\r\n\r\n\/\/ \u7701\u7565<\/pre>\n<p>\u89aa\u30c6\u30fc\u30d6\u30eb\u3067\u3042\u308b\u3001<code>youtube_actions<\/code>\u3078\u306e\u5916\u90e8\u30ad\u30fc\u3092\u3064\u3051\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3067\u306f\u3001\u3053\u306e\u72b6\u614b\u3067\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u3092\u5b9f\u884c\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<\/strong><\/pre>\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-10822\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/08\/youtube_action_history_1.png\" alt=\"\" width=\"453\" height=\"263\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/08\/youtube_action_history_1.png 453w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/08\/youtube_action_history_1-300x174.png 300w\" sizes=\"auto, (max-width: 453px) 100vw, 453px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10823\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/08\/youtube_action_history_2.png\" alt=\"\" width=\"496\" height=\"286\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/08\/youtube_action_history_2.png 496w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/08\/youtube_action_history_2-300x173.png 300w\" sizes=\"auto, (max-width: 496px) 100vw, 496px\" \/><\/p>\n<h2>\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc<\/h2>\n<p><strong>app\/Http\/Controllers\/YoutubeActionController.php<\/strong><\/p>\n<pre><strong>&lt;?php<\/strong>\r\n\r\n<strong>namespace App\\Http\\Controllers;<\/strong>\r\n\r\n<strong>use App\\Models\\YoutubeAction;<\/strong>\r\n<strong>use App\\Models\\YoutubeActionDetail;<\/strong>\r\n<strong>use Illuminate\\Http\\Request;<\/strong>\r\n<strong>use Illuminate\\Support\\Facades\\DB;<\/strong>\r\n\r\n<strong>class YoutubeActionController extends Controller<\/strong>\r\n<strong>{<\/strong>\r\n<strong>    public function index()<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        $action = YoutubeAction::with('details')-&gt;latest()-&gt;first();<\/strong>\r\n\r\n<strong>        return view('youtube_action.index')-&gt;with([<\/strong>\r\n<strong>            'action' =&gt; $action,<\/strong>\r\n<strong>        ]);<\/strong>\r\n<strong>    }<\/strong>\r\n\r\n<strong>    public function create()<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        return view('youtube_action.create');<\/strong>\r\n<strong>    }<\/strong>\r\n\r\n<strong>    public function store(Request $request)<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        \/\/ \u30c6\u30b9\u30c8\u306e\u305f\u3081\u3001\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u306f\u7701\u7565\u3057\u3066\u3044\u307e\u3059<\/strong>\r\n\r\n<strong>        $video_id = $request-&gt;video_id;<\/strong>\r\n<strong>        $player_actions = $request-&gt;player_actions;<\/strong>\r\n<strong>        $ip = $request-&gt;ip();<\/strong>\r\n\r\n<strong>        DB::beginTransaction();<\/strong>\r\n\r\n<strong>        try {<\/strong>\r\n\r\n<strong>            $action = new YoutubeAction();<\/strong>\r\n<strong>            $action-&gt;video_id = $video_id;<\/strong>\r\n<strong>            $action-&gt;ip = $ip;<\/strong>\r\n<strong>            $action-&gt;save();<\/strong>\r\n\r\n<strong>            foreach ($player_actions as $player_action) {<\/strong>\r\n\r\n<strong>                $action_detail = new YoutubeActionDetail();<\/strong>\r\n<strong>                $action_detail-&gt;youtube_action_id = $action-&gt;id;<\/strong>\r\n<strong>                $action_detail-&gt;type = $player_action['type'];<\/strong>\r\n<strong>                $action_detail-&gt;time = $player_action['time'];<\/strong>\r\n<strong>                $action_detail-&gt;save();<\/strong>\r\n\r\n<strong>            }<\/strong>\r\n\r\n<strong>            DB::commit();<\/strong>\r\n\r\n<strong>        } catch (\\Exception $e) {<\/strong>\r\n\r\n<strong>            DB::rollback();<\/strong>\r\n<strong>            throw $e;<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n\r\n<strong>    }<\/strong>\r\n<strong>}<\/strong><\/pre>\n<p>\u306a\u304a\u3001<code>store()<\/code>\u306f\u5c11\u3057\u8907\u96d1\u306a\u3088\u3046\u306b\u898b\u3048\u307e\u3059\u304c\u3001\u5358\u306b\u4ee5\u4e0b\u306e\u3053\u3068\u3092\u3084\u3063\u3066\u3044\u308b\u3060\u3051\u3067\u3059\u3002<\/p>\n<ol>\n<li>\u89aa\u30c6\u30fc\u30d6\u30eb\uff08youtube_actions\uff09\u306b\u30c7\u30fc\u30bf\u3092\u8ffd\u52a0<\/li>\n<li>\u305d\u306e\u30c7\u30fc\u30bf\u306b\u95a2\u3059\u308b\u8a73\u7d30\u30c7\u30fc\u30bf\uff08youtube_action_details\uff09\u3092\u8ffd\u52a0<\/li>\n<\/ol>\n<h1>\u30d3\u30e5\u30fc\u3092\u3064\u304f\u308b<\/h1>\n<p>\u7d9a\u3044\u3066\u3001\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u5185\u3067\u30bb\u30c3\u30c8\u3057\u305f\u30d3\u30e5\u30fc\u3092\u3064\u304f\u3063\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<br \/>\n\u5fc5\u8981\u306b\u306a\u308b\u306e\u306f\u4ee5\u4e0b\uff12\u3064\u3067\u3059\u3002<\/p>\n<ul>\n<li>index: \u6700\u65b0\u306e\u64cd\u4f5c\u5c65\u6b74\u3092\u8868\u793a\u3059\u308b<\/li>\n<li>create: \u52d5\u753b\u64cd\u4f5c\u5c65\u6b74\u3092\u4f5c\u6210\u3059\u308b\uff08\u52d5\u753b\u3092\u8868\u793a\u3059\u308b\uff09<\/li>\n<\/ul>\n<p>\u3067\u306f\u3001\u305d\u308c\u305e\u308c\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><strong>resources\/views\/youtube_action\/index.blade.php<\/strong><\/p>\n<pre><strong>&lt;!DOCTYPE html&gt;<\/strong>\r\n<strong>&lt;html&gt;<\/strong>\r\n<strong>&lt;head&gt;<\/strong>\r\n<strong>    &lt;link href=\"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@5.0.1\/dist\/css\/bootstrap.min.css\" rel=\"stylesheet\"&gt;<\/strong>\r\n<strong>&lt;\/head&gt;<\/strong>\r\n<strong>&lt;body&gt;<\/strong>\r\n<strong>    &lt;div class=\"p-5\"&gt;<\/strong>\r\n<strong>        &lt;div class=\"mb-3\"&gt;<\/strong>\r\n<strong>            \u52d5\u753bID: &lt;a href=\"https:\/\/www.youtube.com\/watch?v={{ $action-&gt;video_id }}\" target=\"_blank\"&gt;{{ $action-&gt;video_id }}&lt;\/a&gt;&lt;br&gt;<\/strong>\r\n<strong>            \u4fdd\u5b58\u65e5\u6642: {{ $action-&gt;created_at-&gt;format('Y-m-d H:i') }}<\/strong>\r\n<strong>        &lt;\/div&gt;<\/strong>\r\n<strong>        &lt;table class=\"table\"&gt;<\/strong>\r\n<strong>            &lt;thead&gt;<\/strong>\r\n<strong>                &lt;tr&gt;<\/strong>\r\n<strong>                    &lt;th&gt;\u518d\u751f\u4f4d\u7f6e\u3000\u3000\u64cd\u4f5c&lt;\/th&gt;<\/strong>\r\n<strong>                &lt;\/tr&gt;<\/strong>\r\n<strong>            &lt;\/thead&gt;<\/strong>\r\n<strong>            &lt;tbody&gt;<\/strong>\r\n<strong>            @foreach($action-&gt;details as $action_detail)<\/strong>\r\n<strong>                &lt;tr&gt;<\/strong>\r\n<strong>                    &lt;td&gt;<\/strong>\r\n<strong>                        {{ $action_detail-&gt;readable_time }}<\/strong>\r\n<strong>                        \u2192<\/strong>\r\n<strong>                        &lt;label class=\"badge bg-secondary\"&gt;<\/strong>\r\n<strong>                            {{ $action_detail-&gt;readable_type }}<\/strong>\r\n<strong>                        &lt;\/label&gt;<\/strong>\r\n<strong>                    &lt;\/td&gt;<\/strong>\r\n<strong>                &lt;\/tr&gt;<\/strong>\r\n<strong>            @endforeach<\/strong>\r\n<strong>            &lt;\/tbody&gt;<\/strong>\r\n<strong>        &lt;\/table&gt;<\/strong>\r\n<strong>    &lt;\/div&gt;<\/strong>\r\n<strong>&lt;\/body&gt;<\/strong>\r\n<strong>&lt;\/html&gt;<\/strong><\/pre>\n<p>\u3053\u306e\u30d3\u30e5\u30fc\u306f\u30b7\u30f3\u30d7\u30eb\u306b\u300c\u6700\u65b0\u306e\u52d5\u753b\u884c\u52d5\u5c65\u6b74\u300d\u3092\u8868\u793a\u3059\u308b\u305f\u3081\u306e\u3082\u306e\u3067\u3059\u3002\uff08\u30c6\u30b9\u30c8\u3067\u78ba\u8a8d\u3059\u308b\u305f\u3081\u306b\u4f5c\u6210\u3057\u307e\u3057\u305f\uff09<\/p>\n<p><strong>resources\/views\/youtube_action\/create.blade.php<\/strong><\/p>\n<pre><strong>&lt;!DOCTYPE html&gt;<\/strong>\r\n<strong>&lt;html&gt;<\/strong>\r\n<strong>&lt;head&gt;<\/strong>\r\n<strong>    &lt;link href=\"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@5.0.1\/dist\/css\/bootstrap.min.css\" rel=\"stylesheet\"&gt;<\/strong>\r\n<strong>&lt;\/head&gt;<\/strong>\r\n<strong>&lt;body&gt;<\/strong>\r\n<strong>    &lt;div class=\"p-5\"&gt;<\/strong>\r\n<strong>        &lt;div id=\"player\"&gt;&lt;\/div&gt;<\/strong>\r\n<strong>        &lt;br&gt;<\/strong>\r\n<strong>        &lt;a href=\"https:\/\/example.com\" class=\"btn btn-primary mt-3\"&gt;&amp;#x2611; \u52d5\u753b\u64cd\u4f5c\u5f8c\u3001\u5225\u30da\u30fc\u30b8\u3078\u79fb\u52d5\u3057\u3066\u9001\u4fe1\u30c6\u30b9\u30c8&lt;\/a&gt;<\/strong>\r\n<strong>    &lt;\/div&gt;<\/strong>\r\n\r\n<strong>    &lt;script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/axios\/0.26.1\/axios.min.js\"&gt;&lt;\/script&gt;<\/strong>\r\n<strong>    &lt;script src=\"https:\/\/www.youtube.com\/iframe_api\"&gt;&lt;\/script&gt;<\/strong>\r\n<strong>    &lt;script&gt;<\/strong>\r\n\r\n<strong>        \/\/ Data<\/strong>\r\n<strong>        const videoId = 'Vg9UPa4plkQ';<\/strong>\r\n<strong>        let player = null;<\/strong>\r\n<strong>        let playerActions = []; \/\/ \u30d7\u30ec\u30fc\u30e4\u30fc\u64cd\u4f5c\u306e\u5c65\u6b74<\/strong>\r\n\r\n<strong>        \/\/ Methods<\/strong>\r\n<strong>        const getCurrentTime = () =&gt; {<\/strong>\r\n\r\n<strong>            const time = player.getCurrentTime();<\/strong>\r\n<strong>            return Math.round(time); \/\/ \u518d\u751f\u4f4d\u7f6e\uff08\u5c0f\u6570\u70b9\u306f\u306a\u304f\u3059\uff09<\/strong>\r\n\r\n<strong>        };<\/strong>\r\n<strong>        const onStateChange = e =&gt; {<\/strong>\r\n\r\n<strong>            const stateId = e.data;<\/strong>\r\n<strong>            const youtubeStates = [ \/\/ \u53d6\u5f97\u3057\u305f\u3044\u72b6\u614b\u30bf\u30a4\u30d7\uff1a https:\/\/developers.google.com\/youtube\/iframe_api_reference<\/strong>\r\n<strong>                { stateId: YT.PlayerState.ENDED, type: 'ended' },     \/\/ \u7d42\u4e86<\/strong>\r\n<strong>                { stateId: YT.PlayerState.PLAYING, type: 'playing' }, \/\/ \u518d\u751f<\/strong>\r\n<strong>                { stateId: YT.PlayerState.PAUSED, type: 'paused' },   \/\/ \u4e00\u6642\u505c\u6b62<\/strong>\r\n<strong>            ];<\/strong>\r\n<strong>            const youtubeState = youtubeStates.find(state =&gt; {<\/strong>\r\n\r\n<strong>                return Number(state.stateId) === Number(stateId);<\/strong>\r\n\r\n<strong>            });<\/strong>\r\n\r\n<strong>            if(youtubeState !== undefined) { \/\/ \u53d6\u5f97\u3057\u305f\u3044\u72b6\u614b\u304c\u3042\u308b\u5834\u5408<\/strong>\r\n\r\n<strong>                const type = youtubeState.type;<\/strong>\r\n<strong>                const time = getCurrentTime();<\/strong>\r\n\r\n<strong>                playerActions.push({ \/\/ \u884c\u52d5\u5c65\u6b74\u3092\u8caf\u3081\u3066\u3044\u304f<\/strong>\r\n<strong>                    type,<\/strong>\r\n<strong>                    time<\/strong>\r\n<strong>                });<\/strong>\r\n\r\n<strong>            }<\/strong>\r\n\r\n<strong>        };<\/strong>\r\n<strong>        window.onYouTubeIframeAPIReady = () =&gt; { \/\/ \u30b0\u30ed\u30fc\u30d0\u30eb\u30ec\u30d9\u30eb\u3067\u306a\u3044\u3068\u30c0\u30e1<\/strong>\r\n\r\n<strong>            \/\/ \u52d5\u753b\u30d7\u30ec\u30a4\u30e4\u30fc\u3092\u6e96\u5099<\/strong>\r\n<strong>            player = new YT.Player('player', {<\/strong>\r\n<strong>                height: '390',<\/strong>\r\n<strong>                width: '640',<\/strong>\r\n<strong>                videoId: videoId,<\/strong>\r\n<strong>                playerVars: { 'playsinline': 1 },<\/strong>\r\n<strong>                events: {<\/strong>\r\n<strong>                    onStateChange: onStateChange \/\/ \u52d5\u753b\u306e\u72b6\u614b\u304c\u5909\u66f4\u306b\u306a\u3063\u305f\u5834\u5408<\/strong>\r\n<strong>                }<\/strong>\r\n<strong>            });<\/strong>\r\n\r\n<strong>        };<\/strong>\r\n\r\n<strong>        \/\/ Events<\/strong>\r\n<strong>        window.addEventListener('beforeunload', () =&gt; { \/\/ \u30da\u30fc\u30b8\u79fb\u52d5\u524d\u306b\u30d7\u30ec\u30fc\u30e4\u30fc\u64cd\u4f5c\u306e\u5c65\u6b74\u3092\u9001\u4fe1<\/strong>\r\n\r\n<strong>            if(playerActions.length &gt; 0) {<\/strong>\r\n\r\n<strong>                playerActions.push({ \/\/ \u6700\u5f8c\u306b\u30da\u30fc\u30b8\u96e2\u8131\u3092\u8ffd\u52a0<\/strong>\r\n<strong>                    type: 'leave',<\/strong>\r\n<strong>                    time: getCurrentTime()<\/strong>\r\n<strong>                });<\/strong>\r\n\r\n<strong>                const url = '{{ route('youtube_action.store') }}';<\/strong>\r\n<strong>                const params = {<\/strong>\r\n<strong>                    video_id: videoId,<\/strong>\r\n<strong>                    player_actions: playerActions,<\/strong>\r\n<strong>                };<\/strong>\r\n<strong>                axios.post(url, params);<\/strong>\r\n\r\n<strong>            }<\/strong>\r\n\r\n<strong>        });<\/strong>\r\n\r\n<strong>    &lt;\/script&gt;<\/strong>\r\n<strong>&lt;\/body&gt;<\/strong>\r\n<strong>&lt;\/html&gt;<\/strong><\/pre>\n<p>\u3053\u3061\u3089\u306f\u3001\u5b9f\u969b\u306b<code>YouTube<\/code>\u52d5\u753b\u306e\u884c\u52d5\u5c65\u6b74\u3092\u4fdd\u5b58\u3059\u308b\u305f\u3081\u306e\u30b3\u30fc\u30c9\u3092\u542b\u3093\u3067\u3044\u307e\u3059\u3002<\/p>\n<p>\u306a\u304a\u3001\u624b\u9806\u3068\u3057\u3066\u306f\u4ee5\u4e0b\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<ol>\n<li>YouTube \u306e\u30a4\u30d9\u30f3\u30c8\u3092\u4f7f\u3063\u3066\u884c\u52d5\u5c65\u6b74\u3092\u8caf\u3081\u3066\u3044\u304f<\/li>\n<li>\u30da\u30fc\u30b8\u3092\u96e2\u8131\u3059\u308b\u969b\u306b\u30c7\u30fc\u30bf\u3092 Ajax \u3067\u9001\u4fe1<\/li>\n<li>Laravel \u5074\u3067\u30c7\u30fc\u30bf\u3092\u4fdd\u5b58<\/li>\n<\/ol>\n<p>\u3061\u306a\u307f\u306b\uff11\u70b9\u6c17\u3092\u3064\u3051\u3066\u3044\u305f\u3060\u304d\u305f\u3044\u306e\u304c\u3001\u4ee5\u4e0b\u306e\u90e8\u5206\u3067\u3059\u3002<\/p>\n<pre><strong>window.onYouTubeIframeAPIReady = () =&gt; { \/\/ \u30b0\u30ed\u30fc\u30d0\u30eb\u30ec\u30d9\u30eb\u3067\u306a\u3044\u3068\u30c0\u30e1<\/strong>\r\n\r\n<strong>    \/\/ \u7701\u7565<\/strong>\r\n\r\n<strong>};<\/strong><\/pre>\n<p>\u4ed6\u306e\u30e1\u30bd\u30c3\u30c9\u306f<code>const<\/code>\u3067\u5b9a\u7fa9\u3057\u3066\u3044\u308b\u306e\u306b\u3001\u3053\u3053\u3067\u306f<code>window<\/code>\u3092\u4f7f\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u306f\u3001<code>YouTube Player API<\/code>\u304c\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3088\u3046\u306b\u30b0\u30ed\u30fc\u30d0\u30eb\u30fb\u30ec\u30d9\u30eb\u3067\u5b9a\u7fa9\u3057\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u305f\u3081\u3067\u3059\u3002\uff08\u5c11\u3057\u30cf\u30de\u30ea\u307e\u3057\u305f\ud83d\ude05\uff09<\/p>\n<p>\u203b \u307e\u305f\u3001\u52d5\u753b\u306f\u79c1\u3082\u305f\u307e\u306b\u89b3\u3066\u7652\u3084\u3055\u308c\u3066\u3044\u308b\u300c\u306b\u3083\u3093\u3053<code>YouTuber<\/code>\u300d\u306e\u300c\u3082\u3061\u307e\u308b\u300d\u3061\u3083\u3093\u306e\u52d5\u753b\u3067\u3059\ud83d\udc3e<\/p>\n<p>\u3067\u306f\u3001\u3053\u308c\u3067\u4f5c\u696d\u306f\u5b8c\u4e86\u3067\u3059\u3002<br \/>\n\u304a\u75b2\u308c\u69d8\u3067\u3057\u305f\ud83d\ude0a\u2728<\/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\u30d6\u30e9\u30a6\u30b6\u3067\u300c<strong>https:\/\/******\/youtube_action\/create<\/strong>\u300d\u3078\u30a2\u30af\u30bb\u30b9\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u52d5\u753b\uff08\u8457\u4f5c\u6a29\u3092\u8003\u3048\u3066\u307c\u304b\u3057\u3066\u3044\u307e\u3059\uff09\u3068\u30dc\u30bf\u30f3\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10824\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/08\/youtube_action_history_3.png\" alt=\"\" width=\"640\" height=\"456\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/08\/youtube_action_history_3.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/08\/youtube_action_history_3-300x214.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u3067\u306f\u3001\u52d5\u753b\u3092\u518d\u751f\u3057\u3001\u3044\u308d\u3044\u308d\u3068\u64cd\u4f5c\u3092\u3057\u305f\u5f8c\u306b\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u3001\u30da\u30fc\u30b8\u96e2\u8131\u3057\u3066\u307f\u307e\u3059\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-10825\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/08\/youtube_action_history_4.png\" alt=\"\" width=\"640\" height=\"287\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/08\/youtube_action_history_4.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/08\/youtube_action_history_4-300x135.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\u30b3\u30fc\u30c9\u3067\u6307\u5b9a\u3057\u305f\u3068\u304a\u308a\u3001<code>example.com<\/code>\u3078\u79fb\u52d5\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u3067\u306f\u3001\u3053\u306e\u72b6\u614b\u3067\u30c7\u30fc\u30bf\u304c\u8ffd\u52a0\u3055\u308c\u3066\u3044\u308b\u304b<code>DB<\/code>\u3092\u30c1\u30a7\u30c3\u30af\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<br \/>\n\u307e\u305a\u306f\u89aa\u30c6\u30fc\u30d6\u30eb\u3067\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10826\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/08\/youtube_action_history_5.png\" alt=\"\" width=\"609\" height=\"272\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/08\/youtube_action_history_5.png 609w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/08\/youtube_action_history_5-300x134.png 300w\" sizes=\"auto, (max-width: 609px) 100vw, 609px\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\u30c7\u30fc\u30bf\u304c\u8ffd\u52a0\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u306d\u3002<\/p>\n<p>\u7d9a\u3044\u3066\u3001\u8a73\u7d30\u30c7\u30fc\u30bf\u306e\u65b9\u3067\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10827\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/08\/youtube_action_history_6.png\" alt=\"\" width=\"568\" height=\"344\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/08\/youtube_action_history_6.png 568w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/08\/youtube_action_history_6-300x182.png 300w\" sizes=\"auto, (max-width: 568px) 100vw, 568px\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\u3053\u3061\u3089\u3082ID<code>1<\/code>\u306e\u30c7\u30fc\u30bf\u304c\u3044\u304f\u3064\u304b\u8ffd\u52a0\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u306d\u3002<\/p>\n<p>\u6210\u529f\u3067\u3059\ud83d\ude0a\u2728<\/p>\n<p>\u3067\u306f\u3001\u6700\u5f8c\u306b\u300c<strong>https:\/\/******\/youtube_aciton<\/strong>\u300d\u3078\u30a2\u30af\u30bb\u30b9\u3057\u3066\u884c\u52d5\u5c65\u6b74\u3092\u8868\u793a\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u3069\u3046\u306a\u308b\u3067\u3057\u3087\u3046\u304b\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb\uff1f\uff1f\uff1f<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10828\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/08\/youtube_action_history_7.png\" alt=\"\" width=\"248\" height=\"659\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/08\/youtube_action_history_7.png 248w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/08\/youtube_action_history_7-113x300.png 113w\" sizes=\"auto, (max-width: 248px) 100vw, 248px\" \/><\/p>\n<p>\u306f\u3044\u2757<\/p>\n<p>\u3044\u308d\u3044\u308d\u3068\u64cd\u4f5c\u3057\u305f\u306e\u3067\u3061\u3087\u3063\u3068\u9577\u304f\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u304c\u3001\u3053\u308c\u3067\u3053\u306e\u30e6\u30fc\u30b6\u30fc\u304c\u52d5\u753b\u3092\u3069\u306e\u3088\u3046\u306b\u898b\u305f\u306e\u304b\u3092\u8a73\u3057\u304f\u77e5\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3059\u3079\u3066\u6210\u529f\u3067\u3059\ud83d\ude0a\ud83d\udc4d<\/p>\n<h1>\u4f01\u696d\u69d8\u3078\u306e\u3054\u63d0\u6848<\/h1>\n<p>\u4eca\u56de\u306e\u6a5f\u80fd\u3092\u4f7f\u3046\u3068\u3001\u4f8b\u3048\u3070\u30e9\u30f3\u30c7\u30a3\u30f3\u30b0\u30da\u30fc\u30b8\u306b\u8a2d\u7f6e\u3057\u305f<code>YouTube<\/code>\u52d5\u753b\u304c\u3069\u306e\u3088\u3046\u306b\u8996\u8074\u3055\u308c\u3066\u3044\u308b\u306e\u304b\u3092\u8a73\u3057\u304f\u77e5\u308b\u3053\u3068\u304c\u3067\u304d\u3001\u7d50\u679c\u3001\u305d\u306e\u52d5\u753b\u304c\u300c<strong>\u30e6\u30fc\u30b6\u30fc\u306e\u7372\u5f97\u306b\u8ca2\u732e\u3057\u3066\u3044\u308b\u304b\u3069\u3046\u304b<\/strong>\u300d\u306e\u5224\u65ad\u3092\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u4eca\u56de\u306f\u30b7\u30f3\u30d7\u30eb\u306b\u518d\u751f\u3084\u4e00\u6642\u505c\u6b62\u306e\u30c7\u30fc\u30bf\u3060\u3051\u3092\u4e26\u3079\u3066\u8868\u793a\u3057\u305f\u3060\u3051\u3067\u3059\u304c\u3001\u305f\u304f\u3055\u3093\u306e\u30c7\u30fc\u30bf\u3092\u96c6\u8a08\u3057\u3001\u30b0\u30e9\u30d5\u3067\u8868\u793a\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3082\u3057\u3001\u3053\u3046\u3044\u3063\u305f\u7d4c\u55b6\u5224\u65ad\u306b\u95a2\u3059\u308b\u3054\u76f8\u8ac7\u304c\u3054\u3056\u3044\u307e\u3057\u305f\u3089\u3001\u3044\u3064\u3067\u3082\u304a\u554f\u3044\u5408\u308f\u305b\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u304a\u5f85\u3061\u3057\u3066\u304a\u308a\u307e\u3059\ud83d\ude0a\u2728<\/p>\n<h1>\u304a\u308f\u308a\u306b<\/h1>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u4eca\u56de\u306f<code>YouTube<\/code>\u52d5\u753b\u306e\u64cd\u4f5c\u5c65\u6b74\u3092\u96c6\u3081\u3066\u4fdd\u5b58\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u3082\u306f\u3084<code>YouTube<\/code>\u306f\u30c6\u30ec\u30d3\u3068\u4e26\u3076\u30e1\u30c7\u30a3\u30a2\u3068\u8a00\u3063\u3066\u3082\u3044\u3044\u3068\u601d\u3044\u307e\u3059\u306e\u3067\u3001\u3053\u306e\u90e8\u5206\u3092\u3088\u308a\u6d3b\u7528\u3059\u308b\u3053\u3068\u3067\u30d3\u30b8\u30cd\u30b9\u3092\u3055\u3089\u306b\u52a0\u901f\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3093\u3058\u3083\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<p>\u304b\u304f\u3044\u3046\u79c1\u3082\u3001\u904e\u53bb\u30c6\u30ec\u30d3\u3063\u5b50\u3060\u3063\u305f\u306e\u304c\u3001\u73fe\u5728\u306f\u81ea\u5ba4\u306b\u30c6\u30ec\u30d3\u306f\u306a\u304f\u3001\u300c<strong>YouTube\u3063\u5b50<\/strong>\u300d\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u306e\u3067\u3001\u6642\u4ee3\u306e\u6d41\u308c\u3092\u611f\u3058\u305a\u306b\u306f\u3044\u3089\u308c\u307e\u305b\u3093\u3002<\/p>\n<p>\uff08\u30d3\u30c7\u30aa\u30ab\u30bb\u30c3\u30c8\u3067\u30c6\u30ec\u30d3\u756a\u7d44\u3092\u30bf\u30a4\u30de\u30fc\u4e88\u7d04\u3057\u3066\u305f\u9803\u304c\u61d0\u304b\u3057\u3044\u3067\u3059\u3002\u306a\u305c\u304b\u305f\u307e\u306b\u5931\u6557\u3059\u308b\u3093\u3067\u3059\u3088\u306d\ud83d\ude02\uff09<\/p>\n<p>\u305c\u3072\u7686\u3055\u3093\u3082<code>YouTube<\/code>\u3092\u4f7f\u3063\u305f\u5b9f\u88c5\u3092\u3084\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-6068 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/03\/no_12.png\" alt=\"\" width=\"226\" height=\"320\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/03\/no_12.png 226w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/03\/no_12-212x300.png 212w\" sizes=\"auto, (max-width: 226px) 100vw, 226px\" \/>\u300c\u6642\u4ee3\u304c\u9055\u3063\u305f\u3089\u3001<br \/>\n<code>YouTuber<\/code>\u3084\u3063\u3066\u307f\u305f\u304b\u3063\u305f\u3067\u3059\ud83d\ude0a\u300d<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u3053\u306e\u30d6\u30ed\u30b0\u3067\u306f\u3044\u308d\u3044\u308d\u306a\u5206\u91ce\u306e\u8a18\u4e8b\u3092\u516c\u958b\u3057\u3066\u304d\u307e\u3057\u305f\u304c\u3001\u305d\u306e\u7406\u7531\u306e\u3072\u3068\u3064\u3068\u3057\u3066\u3001\u300c\u958b\u767a\u8005\u3060\u3051\u3067\u306a\u304f\u3001\u7d4c\u55b6\u8005\u30b5\u30a4\u30c9\u306b\u5411\u3051\u3066\u300d\u60c5\u5831\u767a\u4fe1\u304c\u3057\u305f\u3044\u3068\u3044\u3046\u3082\u306e\u304c &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.capilano-fw.com\/?p=10816\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;Laravel \u3067\u57cb\u3081\u8fbc\u307f YouTube \u306e\u64cd\u4f5c\u5c65\u6b74\u3092\u4fdd\u5b58\u3059\u308b&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":10831,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19,3],"tags":[],"class_list":["post-10816","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-javascript","category-laravel"],"_links":{"self":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/10816","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=10816"}],"version-history":[{"count":7,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/10816\/revisions"}],"predecessor-version":[{"id":10832,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/10816\/revisions\/10832"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/media\/10831"}],"wp:attachment":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10816"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10816"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10816"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}