質問編集履歴
1
エラー情報の追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -481,3 +481,113 @@
|
|
481
481
|
Route::apiResource('/todo', TodoController::class);
|
482
482
|
|
483
483
|
```
|
484
|
+
|
485
|
+
|
486
|
+
|
487
|
+
```error
|
488
|
+
|
489
|
+
POST http://127.0.0.1:8000/api/todo[object%20Object] 404 (Not Found)
|
490
|
+
|
491
|
+
dispatchXhrRequest @ xhr.js?b50d:177
|
492
|
+
|
493
|
+
xhrAdapter @ xhr.js?b50d:13
|
494
|
+
|
495
|
+
dispatchRequest @ dispatchRequest.js?5270:52
|
496
|
+
|
497
|
+
Promise.then (async)
|
498
|
+
|
499
|
+
request @ Axios.js?0a06:61
|
500
|
+
|
501
|
+
Axios.<computed> @ Axios.js?0a06:87
|
502
|
+
|
503
|
+
wrap @ bind.js?1d2b:9
|
504
|
+
|
505
|
+
_callee2$ @ App.vue?234e:38
|
506
|
+
|
507
|
+
tryCatch @ runtime.js?96cf:63
|
508
|
+
|
509
|
+
invoke @ runtime.js?96cf:293
|
510
|
+
|
511
|
+
eval @ runtime.js?96cf:118
|
512
|
+
|
513
|
+
asyncGeneratorStep @ asyncToGenerator.js?1da1:3
|
514
|
+
|
515
|
+
_next @ asyncToGenerator.js?1da1:25
|
516
|
+
|
517
|
+
eval @ asyncToGenerator.js?1da1:32
|
518
|
+
|
519
|
+
eval @ asyncToGenerator.js?1da1:21
|
520
|
+
|
521
|
+
insertTodo @ App.vue?234e:38
|
522
|
+
|
523
|
+
invokeWithErrorHandling @ vue.runtime.esm.js?2b0e:1854
|
524
|
+
|
525
|
+
invoker @ vue.runtime.esm.js?2b0e:2179
|
526
|
+
|
527
|
+
original._wrapper @ vue.runtime.esm.js?2b0e:6917
|
528
|
+
|
529
|
+
vue.runtime.esm.js?2b0e:619 [Vue warn]: Error in v-on handler (Promise/async): "Error: Request failed with status code 404"
|
530
|
+
|
531
|
+
|
532
|
+
|
533
|
+
found in
|
534
|
+
|
535
|
+
|
536
|
+
|
537
|
+
---> <App> at src/App.vue
|
538
|
+
|
539
|
+
<Root>
|
540
|
+
|
541
|
+
warn @ vue.runtime.esm.js?2b0e:619
|
542
|
+
|
543
|
+
logError @ vue.runtime.esm.js?2b0e:1884
|
544
|
+
|
545
|
+
globalHandleError @ vue.runtime.esm.js?2b0e:1879
|
546
|
+
|
547
|
+
handleError @ vue.runtime.esm.js?2b0e:1839
|
548
|
+
|
549
|
+
eval @ vue.runtime.esm.js?2b0e:1856
|
550
|
+
|
551
|
+
Promise.catch (async)
|
552
|
+
|
553
|
+
invokeWithErrorHandling @ vue.runtime.esm.js?2b0e:1856
|
554
|
+
|
555
|
+
invoker @ vue.runtime.esm.js?2b0e:2179
|
556
|
+
|
557
|
+
original._wrapper @ vue.runtime.esm.js?2b0e:6917
|
558
|
+
|
559
|
+
vue.runtime.esm.js?2b0e:1888 Error: Request failed with status code 404
|
560
|
+
|
561
|
+
at createError (createError.js?2d83:16)
|
562
|
+
|
563
|
+
at settle (settle.js?467f:17)
|
564
|
+
|
565
|
+
at XMLHttpRequest.handleLoad (xhr.js?b50d:62)
|
566
|
+
|
567
|
+
logError @ vue.runtime.esm.js?2b0e:1888
|
568
|
+
|
569
|
+
globalHandleError @ vue.runtime.esm.js?2b0e:1879
|
570
|
+
|
571
|
+
handleError @ vue.runtime.esm.js?2b0e:1839
|
572
|
+
|
573
|
+
eval @ vue.runtime.esm.js?2b0e:1856
|
574
|
+
|
575
|
+
Promise.catch (async)
|
576
|
+
|
577
|
+
invokeWithErrorHandling @ vue.runtime.esm.js?2b0e:1856
|
578
|
+
|
579
|
+
invoker @ vue.runtime.esm.js?2b0e:2179
|
580
|
+
|
581
|
+
original._wrapper @ vue.runtime.esm.js?2b0e:6917
|
582
|
+
|
583
|
+
```
|
584
|
+
|
585
|
+
|
586
|
+
|
587
|
+
下記:php artisan route:list --path=api/todoを実行
|
588
|
+
|
589
|
+
```cli
|
590
|
+
|
591
|
+
+--------+-----------+-----------------+--------------+---------------------------------------------+------------+ | Domain | Method | URI | Name | Action | Middleware | +--------+-----------+-----------------+--------------+---------------------------------------------+------------+ | | GET|HEAD | api/todo | todo.index | App\Http\Controllers\TodoController@index | api | | | POST | api/todo | todo.store | App\Http\Controllers\TodoController@store | api | | | GET|HEAD | api/todo/{todo} | todo.show | App\Http\Controllers\TodoController@show | api | | | PUT|PATCH | api/todo/{todo} | todo.update | App\Http\Controllers\TodoController@update | api | | | DELETE | api/todo/{todo} | todo.destroy | App\Http\Controllers\TodoController@destroy | api | +--------+-----------+-----------------+--------------+---------------------------------------------+------------+
|
592
|
+
|
593
|
+
```
|