Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

478
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!