coba lihat output "php artisan route:list" ada method put url api/books tidak kak ? kalau tidak ada, coba "php artisan cache:clear"
ngga ada kak, ada method PUT nya tpi bukan url api/books ini hasil nya :
PS C:\xampp\htdocs\laravel-vue\tugas-laravel-abdul> php artisan route:list
GET|HEAD / ..................................................................................................
GET|HEAD _debugbar/assets/javascript ............ debugbar.assets.js › Barryvdh\Debugbar › AssetController@js
GET|HEAD _debugbar/assets/stylesheets ......... debugbar.assets.css › Barryvdh\Debugbar › AssetController@css
DELETE _debugbar/cache/{key}/{tags?} ... debugbar.cache.delete › Barryvdh\Debugbar › CacheController@delete
GET|HEAD _debugbar/clockwork/{id} .. debugbar.clockwork › Barryvdh\Debugbar › OpenHandlerController@clockwork
GET|HEAD _debugbar/open ............. debugbar.openhandler › Barryvdh\Debugbar › OpenHandlerController@handle
POST _ignition/execute-solution ignition.executeSolution › Spatie\LaravelIgnition › ExecuteSolutionContr…
GET|HEAD _ignition/health-check ....... ignition.healthCheck › Spatie\LaravelIgnition › HealthCheckController
POST _ignition/update-config .... ignition.updateConfig › Spatie\LaravelIgnition › UpdateConfigController
GET|HEAD api/authors ................................................................... AuthorController@api
GET|HEAD api/books ....................................................................... BookController@api
GET|HEAD api/members ................................................................... MemberController@api
GET|HEAD api/publishers ............................................................. PublisherController@api
GET|HEAD api/user ...........................................................................................
GET|HEAD authors ..................................................... authors.index › AuthorController@index
POST authors ..................................................... authors.store › AuthorController@store
GET|HEAD authors/create ............................................ authors.create › AuthorController@create
GET|HEAD authors/{author} .............................................. authors.show › AuthorController@show
PUT|PATCH authors/{author} .......................................... authors.update › AuthorController@update
DELETE authors/{author} ........................................ authors.destroy › AuthorController@destroy
GET|HEAD authors/{author}/edit ......................................... authors.edit › AuthorController@edit
GET|HEAD books ........................................................... books.index › BookController@index
POST books ........................................................... books.store › BookController@store
GET|HEAD books/create .................................................. books.create › BookController@create
GET|HEAD books/{book} ...................................................... books.show › BookController@show
PUT|PATCH books/{book} .................................................. books.update › BookController@update
DELETE books/{book} ................................................ books.destroy › BookController@destroy
GET|HEAD books/{book}/edit ................................................. books.edit › BookController@edit
GET|HEAD catalogs .................................................. catalogs.index › CatalogController@index
POST catalogs .................................................. catalogs.store › CatalogController@store
GET|HEAD catalogs/create ......................................... catalogs.create › CatalogController@create
GET|HEAD catalogs/{catalog} .......................................... catalogs.show › CatalogController@show
PUT|PATCH catalogs/{catalog} ...................................... catalogs.update › CatalogController@update
DELETE catalogs/{catalog} .................................... catalogs.destroy › CatalogController@destroy
GET|HEAD catalogs/{catalog}/edit ..................................... catalogs.edit › CatalogController@edit
GET|HEAD home .......................................................................... HomeController@index
GET|HEAD login ................................................... login › Auth\LoginController@showLoginForm
POST login ................................................................... Auth\LoginController@login
POST logout ........................................................ logout › Auth\LoginController@logout
GET|HEAD members ..................................................... members.index › MemberController@index
POST members ..................................................... members.store › MemberController@store
GET|HEAD members/create ............................................ members.create › MemberController@create
GET|HEAD members/{member} .............................................. members.show › MemberController@show
PUT|PATCH members/{member} .......................................... members.update › MemberController@update
DELETE members/{member} ........................................ members.destroy › MemberController@destroy
GET|HEAD members/{member}/edit ......................................... members.edit › MemberController@edit
GET|HEAD password/confirm ................. password.confirm › Auth\ConfirmPasswordController@showConfirmForm
POST password/confirm ............................................ Auth\ConfirmPasswordController@confirm
POST password/email ................... password.email › Auth\ForgotPasswordController@sendResetLinkEmail
GET|HEAD password/reset ................ password.request › Auth\ForgotPasswordController@showLinkRequestForm
POST password/reset ................................ password.update › Auth\ResetPasswordController@reset
GET|HEAD password/reset/{token} ................. password.reset › Auth\ResetPasswordController@showResetForm
GET|HEAD publishers ............................................ publishers.index › PublisherController@index
POST publishers ............................................ publishers.store › PublisherController@store
GET|HEAD publishers/create ................................... publishers.create › PublisherController@create
GET|HEAD publishers/{publisher} .................................. publishers.show › PublisherController@show
PUT|PATCH publishers/{publisher} .............................. publishers.update › PublisherController@update
DELETE publishers/{publisher} ............................ publishers.destroy › PublisherController@destroy
GET|HEAD publishers/{publisher}/edit ............................. publishers.edit › PublisherController@edit
GET|HEAD register ................................... register › Auth\RegisterController@showRegistrationForm
POST register .......................................................... Auth\RegisterController@register
GET|HEAD sanctum/csrf-cookie .............. sanctum.csrf-cookie › Laravel\Sanctum › CsrfCookieController@show
GET|HEAD transactions ........................................................... TransactionController@index
bagian ini di hapus
<input type="hidden" name="_method" value="PUT" v-if="editStatus" @submit="submitForm($event, books.id)">
bagian ini
<form method="post" :action="actionUrl" autocomplete="off">
ganti jadi ini
<form method="post" :action="actionUrl" autocomplete="off" @submit="submitForm($event, books.id)">
Failed to load resource: the server responded with a status of 404 (Not Found)
user1-128x128.jpg:1 Failed to load resource: the server responded with a status of 404 (Not Found)
user8-128x128.jpg:1 Failed to load resource: the server responded with a status of 404 (Not Found)
user3-128x128.jpg:1 Failed to load resource: the server responded with a status of 404 (Not Found)
vue.js:9099 Download the Vue Devtools extension for a better development experience:
https://github.com/vuejs/vue-devtools
vue.js:9108 You are running Vue in development mode.
Make sure to turn on production mode when deploying for production.
See more tips at https://vuejs.org/guide/deployment.html
3vue.js:634 [Vue warn]: Property or method "actionUrl" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.
(found in <Root>)
warn @ vue.js:634
vue.js:634 [Vue warn]: Error in v-on handler: "ReferenceError: book is not defined"
(found in <Root>)
warn @ vue.js:634
vue.js:1906 ReferenceError: book is not defined
at Vue.submitForm (books:493:92)
at submit (eval at createFunction (vue.js:11698:14), <anonymous>:3:1437)
at invokeWithErrorHandling (vue.js:1872:28)
at HTMLFormElement.invoker (vue.js:2197:16)
at original._wrapper (vue.js:7591:27)
logError @ vue.js:1906
vue.js:634 [Vue warn]: Error in v-on handler: "ReferenceError: book is not defined"
(found in <Root>)
warn @ vue.js:634
vue.js:1906 ReferenceError: book is not defined
at Vue.submitForm (books:493:92)
at submit (eval at createFunction (vue.js:11698:14), <anonymous>:3:1437)
at invokeWithErrorHandling (vue.js:1872:28)
at HTMLFormElement.invoker (vue.js:2197:16)
at original._wrapper (vue.js:7591:27)
logError @ vue.js:1906
errornya jdi gitu kak