I was wondering, why does the scaffolding for a resource use the model to identify something and how do I use that? I haven't found any online resources explaining this.
So the controller is scaffolded looking like
public function show(Model $model){
// return Inertia::render
}
In order to get it to work thus far, i've had to change this to a string $id and pass that along with the route query. I'm using InertiaJS. I was wondering whether there was a faster way to show an individual instance of a model after clicking on it in an index.. It made sense to me that I could pass the object to the show, rather than having to reach out again for the model. Is that what this is built for? If so, I'm not sure how to pass the model's object on a router.get('') call on @click.
Feel free to ask for clarification. I'm really just looking for some basic documentation on how these resources are intended to be used so I can follow best practices.