已解决急发送的请求:axios.get(en/blog/${encodeURI(this.$route.params.id)}
)。then(response => {this.blogpostdetails = response.data.blogpostdetails;
});
和控制器:$ blogpost = Blog :: with('blogcategorylist','admin','blogcomment')-> whereSlug(urldecode($ id))-> get()-> first();
这样更改您的请求会有所帮助
let url = http://127.0.0.1:8000/en/blog/${this.$route.params.id};
axios.get(encodeURI(url))
并且在您的控制器中照常使用它