Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Rohan2812's avatar

Laravel Nova get extra parameters from url

Hi there,

I am using Nova and I'm very happy about this awesome package! But I'm running into something and I don't know how to solve this, even though this seems very easy to do.

Im using Nova to manage a multi tenant website, which has multiple databases. When I load a resource it is loading the default database, but I want to set the database depending on a parameter given in the url, like so: http:site/nova/resource/photos?db=id. But I don't get to know how it is possible to get the db parameter from the url. I tried using an observer on the retrieved method and i tried to override the indexQuery on the nova Resource.

I hope someone can help me out with this. Also if there are better approaches to use one resource, for multiple databases, please let me know!

0 likes
2 replies
aemaddin@gmail.com's avatar

are you using any package for multi tenancy or just writing it from scratch?

if you are using a package, please provide the name to help you much further.

Please or to participate in this conversation.