user(); //firstOrCreate só cria se não existir, se existir, atualiza o watched_at VideoView::firstOrCreate([ 'user_id' => $user->id, 'video_id' => $video->id, ], [ 'watched_at' => now(), ]); return response()->json(['watched' => true]); } }