Skip to content

How to combine with barryvdh/laravel-ide-helper model docs and PHPStan #365

Closed Answered by SolveSoul
SolveSoul asked this question in Q&A
Discussion options

You must be logged in to vote

For what it's worth, I fixed the issue using a custom Model Hook.

You'll need to publish the ide-helper config file using:

php artisan vendor:publish --provider="Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider" --tag=config

Then you'll need to create a model hook class and add its reference to the ide-helper.php config file under the model_hooks section.

See this gist for the code:

https://gist.github.com/SolveSoul/f9db8b9370d96c1aa4273b2280cb9b89

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by SolveSoul
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants