我在 Vue/Laravel 中創(chuàng)建我的第一個 CRUD,現(xiàn)在我嘗試將創(chuàng)建發(fā)送到我的后端應(yīng)用程序,這是我的代碼:前端:async addDespesa() { let uri = "api/despesas/create"; const response = await axios.get(uri, this.despesa).then((response) => { this.$router.push({ name: "despesas" }); });},后端:public function create(){ //}在瀏覽器上檢查時出錯:>[vue-router] Route with name 'despesas' does not exist >Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location: "/". at createRouterError at createNavigationDuplicatedErrorat HashHistory.confirmTransitionat HashHistory.transitionToat evalat HashHistory.pushat new Promise at VueRouter.pushat eval
Laravel CRUD Axios Vue
慕容3067478
2023-09-21 10:07:46