laravel-query-intellij icon indicating copy to clipboard operation
laravel-query-intellij copied to clipboard

Multiple connections

Open ghariosk opened this issue 9 months ago • 3 comments

Hi there,

First off, thanks for the amazing plugin—it's really handy!

I might've stumbled onto a small bug regarding multiple database connections. Here's what I'm seeing:

When calling:

DB::table() // suggests tables from all connections

I expected it would suggest tables only from the default connection, but right now it shows tables from every available connection.

Additionally, with this:

DB::connection("connection2")->table() // suggests tables from default connection only

I would've thought it should suggest tables specifically from the connection2 connection, but it’s still suggesting tables from the default connection.

Am I misunderstanding the intended behavior, or could this be an issue with my setup?

Thanks!

ghariosk avatar Mar 17 '25 10:03 ghariosk

Hey, it doesn't understand connections() call as that requires parsing configs, etc 🙂 You can hoverwer, in plugin settings configure which databases you want to auto complete.

ekvedaras avatar Mar 17 '25 10:03 ekvedaras

Oh that's too bad 🥲 Thanks for getting back to me. Would you be open for a pull request?

ghariosk avatar Mar 19 '25 06:03 ghariosk

Definitely! I will warn you though that main branch may be a bit daunting 🙈 If you want you can try to target v5 and I'll port it to main.

ekvedaras avatar Mar 19 '25 06:03 ekvedaras