[Vuejs]-Error in Laravel vue inertia creating search with pagination

0👍

base on the documentation

you should do like this:

export default {

  data() {
     term: '',
     routes: {{ json_encode($routes) }}
  }

  ...

  methods: {
    search() {
      this.$inertia.replace(this.routes('member.index', {term: this.term}))
    }
  }
}

You should pass then json_encode to your data and access it.

Leave a comment