Another approach is parse the Referer header value, but it depends on user's browser. If the server has a restrictive Permissions-Policy header will stop working.
Pass GET arguments set on resource detail request to Laravel Nova's API
Hi
I want to add some parameters to the detail URL of a resource and make it accesible from the Laravel Nova API. The reason is that I want to show/hide relationships and resource tools depending on GET arguments. Example: http://localhost/nova/resources/posts/1?key=value
All requests to display resource and its relationships and tools are made via ajax without these data. So on the fields method of the resource I can't use $request->get('key'). It is necessary for me to display a resource tool based on arguments that are set after redirecting from an action.
As a workaround I save the arguments using cache on a middleware and read it from the backend.
Is there an easier way to do it?. Does Laravel Nova provide a way to read the current URL when its called through ajax?
Thanks!
Please or to participate in this conversation.