let token = document.head.querySelector('meta[name="csrf-token"]');

if (token) {
    window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content;
}
 <meta name="csrf-token" content="{{ csrf-token() }}">
  data() {
    return {
      newStep: "",
      token: document.head.querySelector('meta[name="csrf-token"]').content
    };
  },
<input type="hidden" name="_token" :value="token" />

标签: vue

添加新评论