It should be the id of the Book; so you are making a DELETE request from your React app to /books/123 where 123 is the id of a Book model. Laravel's Route-Model binding will attempt to find a Book instance based on the id in the URI.
Nov 10, 2020
3
Level 1
Laravel resource controller.
In my app controller I have method e.g like this:
public function destroy( Book $book ) { ... }
and route like this:
Route::resource('books', BookController::class);
I want to send request from my spa app to the server but I'm confused .. how should I pass Book object from React app to Laravel api ?
Level 104
Please or to participate in this conversation.