全新 Nova 安装,但无法删除新创建的用户
Fresh Nova install, yet cannot delete newly created Users
这是一个新的 Laravel Nova 安装。我添加了一些测试用户,但无法删除任何用户。确认我要删除资源后,没有任何反应。刷新显示没有被删除。
Laravel 日志为空。
APP_ENV=本地
APP_DEBUG=真
我已经安装了 Vue Devtools 并将 npm 编译为开发模式,所以我看到了 Vue 控制台错误。
我没有添加任何代码,并且是 运行 最新的 - Laravel Framework 5.8.29,Nova 2.0.9,PHP 7.3.7
正在尝试删除 ID 为 4 的用户。
预期:资源已删除且没有错误。
实际:Devtools Vue 控制台显示:
DELETE https://nova.local/nova-api/users?search=&filters=W10%3D&trashed=&viaResource=&viaResourceId=&viaRelationship=&resources[]=4 405
vendor.js?id=09758f7de86ec728ec5f:6848 DELETE https://nova.local/nova-api/users?search=&filters=W10%3D&trashed=&viaResource=&viaResourceId=&viaRelationship=&resources[]=4 405
dispatchXhrRequest @ vendor.js?id=09758f7de86ec728ec5f:6848
xhrAdapter @ vendor.js?id=09758f7de86ec728ec5f:6699
dispatchRequest @ vendor.js?id=09758f7de86ec728ec5f:7255
Promise.then (async)
request @ vendor.js?id=09758f7de86ec728ec5f:7074
wrap @ vendor.js?id=09758f7de86ec728ec5f:7495
request @ app.js?id=a16899bd00909d3799c4:52998
deleteResources @ vendor.js?id=09758f7de86ec728ec5f:32864
invokeWithErrorHandling @ vendor.js?id=09758f7de86ec728ec5f:96710
invoker @ vendor.js?id=09758f7de86ec728ec5f:97035
invokeWithErrorHandling @ vendor.js?id=09758f7de86ec728ec5f:96710
Vue.$emit @ vendor.js?id=09758f7de86ec728ec5f:98730
deleteResource @ app.js?id=a16899bd00909d3799c4:9640
confirmDelete @ app.js?id=a16899bd00909d3799c4:7397
invokeWithErrorHandling @ vendor.js?id=09758f7de86ec728ec5f:96710
invoker @ vendor.js?id=09758f7de86ec728ec5f:97035
invokeWithErrorHandling @ vendor.js?id=09758f7de86ec728ec5f:96710
Vue.$emit @ vendor.js?id=09758f7de86ec728ec5f:98730
handleConfirm @ app.js?id=a16899bd00909d3799c4:9064
submit @ app.js?id=a16899bd00909d3799c4:39744
invokeWithErrorHandling @ vendor.js?id=09758f7de86ec728ec5f:96710
invoker @ vendor.js?id=09758f7de86ec728ec5f:97035
original._wrapper @ vendor.js?id=09758f7de86ec728ec5f:102388
vendor.js?id=09758f7de86ec728ec5f:95481
[Vue warn]: Error in v-on handler (Promise/async): "Error: Request failed with status code 405"
found in
---> <ResourceTable> at resources/js/components/ResourceTable.vue
<LoadingView> at resources/js/components/LoadingView.vue
<Card> at resources/js/components/Card.vue
<LoadingView> at resources/js/components/LoadingView.vue
<ResourceIndex> at resources/js/views/Index.vue
<Root>
warn @ vendor.js?id=09758f7de86ec728ec5f:95481
logError @ vendor.js?id=09758f7de86ec728ec5f:96740
globalHandleError @ vendor.js?id=09758f7de86ec728ec5f:96735
handleError @ vendor.js?id=09758f7de86ec728ec5f:96695
(anonymous) @ vendor.js?id=09758f7de86ec728ec5f:96712
Promise.catch (async)
invokeWithErrorHandling @ vendor.js?id=09758f7de86ec728ec5f:96712
invoker @ vendor.js?id=09758f7de86ec728ec5f:97035
invokeWithErrorHandling @ vendor.js?id=09758f7de86ec728ec5f:96710
Vue.$emit @ vendor.js?id=09758f7de86ec728ec5f:98730
deleteResource @ app.js?id=a16899bd00909d3799c4:9640
confirmDelete @ app.js?id=a16899bd00909d3799c4:7397
invokeWithErrorHandling @ vendor.js?id=09758f7de86ec728ec5f:96710
invoker @ vendor.js?id=09758f7de86ec728ec5f:97035
invokeWithErrorHandling @ vendor.js?id=09758f7de86ec728ec5f:96710
Vue.$emit @ vendor.js?id=09758f7de86ec728ec5f:98730
handleConfirm @ app.js?id=a16899bd00909d3799c4:9064
submit @ app.js?id=a16899bd00909d3799c4:39744
invokeWithErrorHandling @ vendor.js?id=09758f7de86ec728ec5f:96710
invoker @ vendor.js?id=09758f7de86ec728ec5f:97035
original._wrapper @ vendor.js?id=09758f7de86ec728ec5f:102388
vendor.js?id=09758f7de86ec728ec5f:96744 Error: Request failed with status code 405
at createError (vendor.js?id=09758f7de86ec728ec5f:7186)
at settle (vendor.js?id=09758f7de86ec728ec5f:7337)
at XMLHttpRequest.handleLoad (vendor.js?id=09758f7de86ec728ec5f:6747)
logError @ vendor.js?id=09758f7de86ec728ec5f:96744
globalHandleError @ vendor.js?id=09758f7de86ec728ec5f:96735
handleError @ vendor.js?id=09758f7de86ec728ec5f:96695
(anonymous) @ vendor.js?id=09758f7de86ec728ec5f:96712
Promise.catch (async)
invokeWithErrorHandling @ vendor.js?id=09758f7de86ec728ec5f:96712
invoker @ vendor.js?id=09758f7de86ec728ec5f:97035
invokeWithErrorHandling @ vendor.js?id=09758f7de86ec728ec5f:96710
Vue.$emit @ vendor.js?id=09758f7de86ec728ec5f:98730
deleteResource @ app.js?id=a16899bd00909d3799c4:9640
confirmDelete @ app.js?id=a16899bd00909d3799c4:7397
invokeWithErrorHandling @ vendor.js?id=09758f7de86ec728ec5f:96710
invoker @ vendor.js?id=09758f7de86ec728ec5f:97035
invokeWithErrorHandling @ vendor.js?id=09758f7de86ec728ec5f:96710
Vue.$emit @ vendor.js?id=09758f7de86ec728ec5f:98730
handleConfirm @ app.js?id=a16899bd00909d3799c4:9064
submit @ app.js?id=a16899bd00909d3799c4:39744
invokeWithErrorHandling @ vendor.js?id=09758f7de86ec728ec5f:96710
invoker @ vendor.js?id=09758f7de86ec728ec5f:97035
original._wrapper @ vendor.js?id=09758f7de86ec728ec5f:102388
我相信我已经找到了自己的解决方案。
IIS 默认不处理所有动词,具体来说,默认不处理PUT 和DELETE。我在允许的动词中添加了 DELETE 和 - 删除!
这是一个新的 Laravel Nova 安装。我添加了一些测试用户,但无法删除任何用户。确认我要删除资源后,没有任何反应。刷新显示没有被删除。
Laravel 日志为空。
APP_ENV=本地
APP_DEBUG=真
我已经安装了 Vue Devtools 并将 npm 编译为开发模式,所以我看到了 Vue 控制台错误。
我没有添加任何代码,并且是 运行 最新的 - Laravel Framework 5.8.29,Nova 2.0.9,PHP 7.3.7
正在尝试删除 ID 为 4 的用户。
预期:资源已删除且没有错误。
实际:Devtools Vue 控制台显示:
DELETE https://nova.local/nova-api/users?search=&filters=W10%3D&trashed=&viaResource=&viaResourceId=&viaRelationship=&resources[]=4 405
vendor.js?id=09758f7de86ec728ec5f:6848 DELETE https://nova.local/nova-api/users?search=&filters=W10%3D&trashed=&viaResource=&viaResourceId=&viaRelationship=&resources[]=4 405
dispatchXhrRequest @ vendor.js?id=09758f7de86ec728ec5f:6848
xhrAdapter @ vendor.js?id=09758f7de86ec728ec5f:6699
dispatchRequest @ vendor.js?id=09758f7de86ec728ec5f:7255
Promise.then (async)
request @ vendor.js?id=09758f7de86ec728ec5f:7074
wrap @ vendor.js?id=09758f7de86ec728ec5f:7495
request @ app.js?id=a16899bd00909d3799c4:52998
deleteResources @ vendor.js?id=09758f7de86ec728ec5f:32864
invokeWithErrorHandling @ vendor.js?id=09758f7de86ec728ec5f:96710
invoker @ vendor.js?id=09758f7de86ec728ec5f:97035
invokeWithErrorHandling @ vendor.js?id=09758f7de86ec728ec5f:96710
Vue.$emit @ vendor.js?id=09758f7de86ec728ec5f:98730
deleteResource @ app.js?id=a16899bd00909d3799c4:9640
confirmDelete @ app.js?id=a16899bd00909d3799c4:7397
invokeWithErrorHandling @ vendor.js?id=09758f7de86ec728ec5f:96710
invoker @ vendor.js?id=09758f7de86ec728ec5f:97035
invokeWithErrorHandling @ vendor.js?id=09758f7de86ec728ec5f:96710
Vue.$emit @ vendor.js?id=09758f7de86ec728ec5f:98730
handleConfirm @ app.js?id=a16899bd00909d3799c4:9064
submit @ app.js?id=a16899bd00909d3799c4:39744
invokeWithErrorHandling @ vendor.js?id=09758f7de86ec728ec5f:96710
invoker @ vendor.js?id=09758f7de86ec728ec5f:97035
original._wrapper @ vendor.js?id=09758f7de86ec728ec5f:102388
vendor.js?id=09758f7de86ec728ec5f:95481
[Vue warn]: Error in v-on handler (Promise/async): "Error: Request failed with status code 405"
found in
---> <ResourceTable> at resources/js/components/ResourceTable.vue
<LoadingView> at resources/js/components/LoadingView.vue
<Card> at resources/js/components/Card.vue
<LoadingView> at resources/js/components/LoadingView.vue
<ResourceIndex> at resources/js/views/Index.vue
<Root>
warn @ vendor.js?id=09758f7de86ec728ec5f:95481
logError @ vendor.js?id=09758f7de86ec728ec5f:96740
globalHandleError @ vendor.js?id=09758f7de86ec728ec5f:96735
handleError @ vendor.js?id=09758f7de86ec728ec5f:96695
(anonymous) @ vendor.js?id=09758f7de86ec728ec5f:96712
Promise.catch (async)
invokeWithErrorHandling @ vendor.js?id=09758f7de86ec728ec5f:96712
invoker @ vendor.js?id=09758f7de86ec728ec5f:97035
invokeWithErrorHandling @ vendor.js?id=09758f7de86ec728ec5f:96710
Vue.$emit @ vendor.js?id=09758f7de86ec728ec5f:98730
deleteResource @ app.js?id=a16899bd00909d3799c4:9640
confirmDelete @ app.js?id=a16899bd00909d3799c4:7397
invokeWithErrorHandling @ vendor.js?id=09758f7de86ec728ec5f:96710
invoker @ vendor.js?id=09758f7de86ec728ec5f:97035
invokeWithErrorHandling @ vendor.js?id=09758f7de86ec728ec5f:96710
Vue.$emit @ vendor.js?id=09758f7de86ec728ec5f:98730
handleConfirm @ app.js?id=a16899bd00909d3799c4:9064
submit @ app.js?id=a16899bd00909d3799c4:39744
invokeWithErrorHandling @ vendor.js?id=09758f7de86ec728ec5f:96710
invoker @ vendor.js?id=09758f7de86ec728ec5f:97035
original._wrapper @ vendor.js?id=09758f7de86ec728ec5f:102388
vendor.js?id=09758f7de86ec728ec5f:96744 Error: Request failed with status code 405
at createError (vendor.js?id=09758f7de86ec728ec5f:7186)
at settle (vendor.js?id=09758f7de86ec728ec5f:7337)
at XMLHttpRequest.handleLoad (vendor.js?id=09758f7de86ec728ec5f:6747)
logError @ vendor.js?id=09758f7de86ec728ec5f:96744
globalHandleError @ vendor.js?id=09758f7de86ec728ec5f:96735
handleError @ vendor.js?id=09758f7de86ec728ec5f:96695
(anonymous) @ vendor.js?id=09758f7de86ec728ec5f:96712
Promise.catch (async)
invokeWithErrorHandling @ vendor.js?id=09758f7de86ec728ec5f:96712
invoker @ vendor.js?id=09758f7de86ec728ec5f:97035
invokeWithErrorHandling @ vendor.js?id=09758f7de86ec728ec5f:96710
Vue.$emit @ vendor.js?id=09758f7de86ec728ec5f:98730
deleteResource @ app.js?id=a16899bd00909d3799c4:9640
confirmDelete @ app.js?id=a16899bd00909d3799c4:7397
invokeWithErrorHandling @ vendor.js?id=09758f7de86ec728ec5f:96710
invoker @ vendor.js?id=09758f7de86ec728ec5f:97035
invokeWithErrorHandling @ vendor.js?id=09758f7de86ec728ec5f:96710
Vue.$emit @ vendor.js?id=09758f7de86ec728ec5f:98730
handleConfirm @ app.js?id=a16899bd00909d3799c4:9064
submit @ app.js?id=a16899bd00909d3799c4:39744
invokeWithErrorHandling @ vendor.js?id=09758f7de86ec728ec5f:96710
invoker @ vendor.js?id=09758f7de86ec728ec5f:97035
original._wrapper @ vendor.js?id=09758f7de86ec728ec5f:102388
我相信我已经找到了自己的解决方案。
IIS 默认不处理所有动词,具体来说,默认不处理PUT 和DELETE。我在允许的动词中添加了 DELETE 和 - 删除!