Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

481
Vistas
Vue JS bug, @click item executing an action thats in Cache On Laravel app

I am building a Vue comment section in a Laravel Blog with Vue 3, Laravel and Bootstrap.

I have this method for storing comments in the Comments Table (MySQL)

<script>
export default {
   props: ['userid', 'blogid'],
    data() {
       return {
           formData:{
               comment:'',
               user_id: this.userid,
               blog_id: this.blogid,

           }
       }
    },
    methods: {
       commentStore(){
           axios.post('comment/store', this.formData).then((response)=> {
           console.log(response.data)
       }).catch((errors) =>{
               console.log(errors)
    });
       }
    }
}

It should be executed upon clicking the commentStore item, as seen below:

<template>
<div class="row">
    <div class="col-xl-12">
        <div class="comment-form__input-box">
            <textarea name="comment" v-model="formData.comment" placeholder="Your message here" rows="2"></textarea>
        </div>
        <button type="submit" class="thm-btn comment-form__btn" @click.native="commentStore">submit
            comment</button>
    </div>
</div>

The Problem

On click, the item still executes a previous method that I deleted.

  <script>
export default {
   props: ['userid', 'blogid'],
    data() {
       return {
           formData:{
               comment:'',
               user_id: this.userid,
               blog_id: this.blogid,

           }
       }
    },
    methods: {
       commentStore(){
        alert(this.userid)
       }
    }
}

enter image description here

Question

  1. How do I clear Vue Js Cache?

  2. If it's not the Cache, why is the current method not executing?

I have Tried

  1. clearing browsers cache

  2. performing a PHP artisan optimize on CLI

No changes, Thank you for the Assit.

about 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda