ekvedaras / laravel-query-intellij

💿 Laravel Query Builder integration for PhpStorm
MIT License
47 stars 3 forks source link

Plugin doesn't work when using a table prefix #80

Closed MaartenStaa closed 2 years ago

MaartenStaa commented 2 years ago

Hi there,

In our project all tables have a prefix, let's say prj_, which we have configured in config/database.php under connections.mysql.prefix. As a result, this plugin flags all table references (and therefore the columns as well) as Unknown table or view.

Ideally the plugin should read the table prefix from the configuration file, and use it to map, for example, DB::table('users') to the MySQL table prj_users. Alternatively, it could offer a configuration setting for this in the plugin.