Closed hmakein closed 3 years ago
Please have a look at the new release v1.3.0
where I have added this feature and updated the the docs (https://github.com/bernhardh/nova-dynamic-views#access-resource-data).
To sum it up, now you have access to the id with request('id')
. Then you can query for the model:
$this->model()->query()->where('id', request('id'))->first();
Is your problem solved with this?
@bernhardh That worked perfectly. Thank you so much!
I'm using the
customDetailToolbarComponents()
method in a model, and I'm wondering if there's a way to pass in data about the current model that the detail page is displaying. My hope would be to at least get the model ID, then use that to pass the data I need as a second parameter on theaddItem()
method.I tried getting the current model ID using
request()
, but that only provides information for thenova-vendor/nova-dynamic-views/{resource}/{method}
route.