Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ide-helper:models fails to fetch database data if $table property has database prefix #1487

Closed
shuergab opened this issue Nov 29, 2023 · 2 comments
Labels

Comments

@shuergab
Copy link

Versions:

  • ide-helper Version: 2.13.0
  • Laravel Version: 10.34.2
  • PHP Version: 8.2

Description:

I have multiple databases on the same connection, so my models have database prefix. If i run php artisan ide-helper:models the models with a prefix won't work, but if I change default database and remove the prefix it works.

Steps To Reproduce:

Create a model with a $table property with database prefix:
$table = 'laravel.users';
run php artisan ide-helper:models "App\Models\User" -R -W
The generated phpdoc won't have the table fields
Change $table property:
$table = 'users';
run php artisan ide-helper:models "App\Models\User" -R -W
The phpdoc has now the fields

@shuergab shuergab added the bug label Nov 29, 2023
@shuergab
Copy link
Author

shuergab commented Dec 1, 2023

Did a PR to fix this
#1488

@barryvdh
Copy link
Owner

barryvdh commented Feb 8, 2024

Above pr is merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants